Advertisement
JLindvig

nginx/default

Oct 30th, 2019
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.56 KB | None | 0 0
  1. # Redirect all http traffic to https
  2. server {
  3.     listen 80;
  4.     return 301 https://$host$request_uri;
  5. }
  6.  
  7. server {
  8.     listen 443 ssl http2 default_server;
  9.     server_name DIT_DOMAIN.duckdns.org;
  10.     root /config/www/Dashboard;
  11.     index index.html index.htm index.php;
  12.  
  13.     client_max_body_size 0;
  14.  
  15.     #SSL settings
  16.     ssl_certificate /etc/letsencrypt/live/DIT_DOMAIN.duckdns.org/fullchain.pem;
  17.     ssl_certificate_key /etc/letsencrypt/live/DIT_DOMAIN.duckdns.org/privkey.pem;
  18.     ssl_protocols TLSv1.1 TLSv1.2;
  19.     ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
  20.     add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
  21.     ssl_prefer_server_ciphers on;
  22.  
  23.     location / {
  24.         try_files $uri $uri/ /index.html /index.php?$args =404;
  25.     }
  26.  
  27.     location ~ \.php$ {
  28.         fastcgi_split_path_info ^(.+\.php)(/.+)$;
  29.         # With php5-cgi alone:
  30.         fastcgi_pass 127.0.0.1:9000;
  31.         # With php5-fpm:
  32.         #fastcgi_pass unix:/var/run/php5-fpm.sock;
  33.         fastcgi_index index.php;
  34.         include /etc/nginx/fastcgi_params;
  35.     }
  36.  
  37.     # BLOCK ORGANIZR DASHBOARD FILES
  38.     location ~ /loginLog.json|chat.db|users.db|org.log {
  39.         return 404;
  40.     }
  41.  
  42.     location /auth-admin {
  43.         internal;
  44.         proxy_pass http://organizr/auth.php?admin;
  45.         proxy_set_header Content-Length "";
  46.     }
  47.  
  48.     location /auth-user {
  49.         internal;
  50.         proxy_pass http://organizr/auth.php?user;
  51.         proxy_set_header Content-Length "";
  52.     }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement