Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2017
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.77 KB | None | 0 0
  1. server {
  2.     listen       80;
  3.     server_name  localhost;
  4.  
  5.  
  6.     add_header X-Frame-Options SAMEORIGIN;
  7.     add_header X-Content-Type-Options nosniff;
  8.     add_header X-XSS-Protection "1; mode=block";
  9.     add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
  10.  
  11.  
  12.     #charset koi8-r;
  13.     access_log  /var/log/nginx/access.log  main;
  14.     error_log  /var/log/nginx/error.log;
  15.  
  16.         root   /usr/share/nginx/html/passbolt/app/webroot;
  17.     index index.php;
  18.  
  19.     location / {
  20.     try_files $uri $uri/ /index.php?$args;
  21.     }
  22.  
  23.     #error_page  404              /404.html;
  24.  
  25.     # redirect server error pages to the static page /50x.html
  26.     #
  27.     error_page   500 502 503 504  /50x.html;
  28.     location = /50x.html {
  29.         root   /usr/share/nginx/html;
  30.     }
  31.  
  32.     # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  33.     #
  34.     #location ~ \.php$ {
  35.     #    proxy_pass   http://127.0.0.1;
  36.     #}
  37.  
  38.     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  39.     #
  40.     location ~ \.php$ {
  41.     try_files $uri =404;
  42.     include /etc/nginx/fastcgi_params;
  43.         fastcgi_pass   unix:/run/php-fpm/www_71.sock;
  44.         fastcgi_index  index.php;
  45.     #fastcgi_split_path_info ^(.+\.php)(.+)$;
  46.     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  47.         #include        fastcgi_params;
  48.     #fastcgi_param           SERVER_NAME $http_host;
  49.     }
  50.     location ~* \.(jpe?g|woff|woff2|ttf|gif|png|bmp|ico|css|js|json|pdf|zip|htm|html|docx?|xlsx?|pptx?|txt|wav|swf|svg|avi|mp\d)$ {
  51.     #access_log off;
  52.     #log_not_found off;
  53.     try_files $uri /app/webroot/$uri /index.php?$args;
  54.   }
  55.  
  56.     # deny access to .htaccess files, if Apache's document root
  57.     # concurs with nginx's one
  58.     #
  59.     #location ~ /\.ht {
  60.     #    deny  all;
  61.     #}
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement