Advertisement
Guest User

Untitled

a guest
Apr 19th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.37 KB | None | 0 0
  1. server_tokens off;
  2. add_header X-Frame-Options SAMEORIGIN;
  3. add_header X-Content-Type-Options nosniff;
  4. add_header X-XSS-Protection "1; mode=block";
  5.  
  6. server {
  7.         listen 80;
  8.  
  9.         root /var/www/public;
  10.         index index.php;
  11.  
  12.         server_name minnit.dev 10.0.1.8
  13.    
  14.     error_page 404 /404.php;
  15.  
  16.     location ~ /(chatnode|json) {
  17.         deny all;
  18.     return 404;
  19.         }
  20.  
  21.     location ^~ /chatnode/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js { }
  22.         location ^~ /chatnode/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js.map { }
  23.    
  24.     rewrite ^/(register|login|activate|forgotpassword|support/open|support/view|support/agent/open|support/agent/view|accountsettings|createchat|changepassword|editchat|editfriends|actionlog|transcript|2fasetup|reports|webadmin)(/?$) /$1.php break;
  25.     rewrite ^/(?!support$)([a-zA-Z0-9]+)$ /chatroom.php?chat=$1 break;
  26.     rewrite ^/js/socket.io.js /chatnode/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js break;
  27.         rewrite ^/js/socket.io.js.map /chatnode/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js.map break;
  28.  
  29.     location ~ \.php$ {
  30.     try_files $uri =404;
  31.     fastcgi_index index.php;
  32.     fastcgi_split_path_info ^(.+\.php)(/.+)$;
  33.     fastcgi_pass unix:/run/php/php7.1-fpm.sock;
  34.     include fastcgi_params;
  35.     }
  36.  
  37.     location ~ /\.ht {
  38.     deny all;
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement