Advertisement
Guest User

Untitled

a guest
Mar 15th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.46 KB | None | 0 0
  1.  
  2.  
  3. upstream organizr-https {
  4.         server unix:/var/run/php-fpm/xxxx.socket;
  5. }
  6.  
  7. server {
  8.         listen 443 ssl http2;
  9.         server_name xxxx;
  10.     ssl_certificate /etc/letsencrypt/live/xxxx/fullchain.pem; # managed by Certbot
  11.     ssl_certificate_key /etc/letsencrypt/live/xxxx/privkey.pem; # managed by Certbot
  12.  
  13.  
  14.         root /home/organizr/Organizr;
  15.         index index.php;
  16.  
  17.         # set max upload size
  18.         client_max_body_size 2G;
  19.         fastcgi_buffers 64 4K;
  20.  
  21.         access_log /var/log/nginx/organizr_https_access.log combined;
  22.         error_log /var/log/nginx/organizr_https_error.log;
  23.  
  24.         location = /robots.txt {
  25.                 allow all;
  26.                 log_not_found off;
  27.                 access_log off;
  28.         }
  29.  
  30.     location / {
  31.                 try_files $uri $uri/ /index.php?$args ;
  32.         }
  33.  
  34.     location ~ \.php(?:$|/) {
  35.                 fastcgi_split_path_info ^(.+\.php)(/.+)$;
  36.                 include fastcgi_params;
  37.                 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  38.                 fastcgi_param PATH_INFO $fastcgi_path_info;
  39.                 fastcgi_param HTTPS on;
  40.                 fastcgi_pass organizr-https;
  41.                 fastcgi_read_timeout 60s;
  42.         }
  43. }
  44. # Every HTTP request will be forwarded to HTTPS by default
  45. # Remove the block below to disable HTTP connections
  46. server {
  47.     listen 80;
  48.     server_name xxxx;
  49.     rewrite ^/(.*)$ https://$host:443/$1 redirect;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement