Advertisement
Guest User

default.conf

a guest
Apr 26th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.59 KB | None | 0 0
  1. server {
  2.     listen 80;
  3.     server_name 10.233.217.137;
  4.     #charset koi8-r; access_log /var/log/nginx/host.access.log main;
  5.         add_header X-Frame-Options DENY;
  6.         add_header X-Content-Type-Options nosniff;
  7.         add_header X-XSS-Protection "1; mode=block";
  8.         add_header Cache-Control no-cache,no-store,private;
  9.  
  10.     #root /etc/nginx/html;
  11.     index index.php index.html index.htm;
  12.  
  13.     location / {
  14.         try_files $uri $uri/ $uri.html $uri.php$is_args$query_string;
  15.     }
  16.  
  17.     location /fsm_api/public {
  18.         try_files $uri $uri/ $uri.html /fsm_api/public/index.php?$query_string;
  19.     }
  20.  
  21.     #error_page 404 /404.html;
  22.     # redirect server error pages to the static page /50x.html
  23.     #
  24.     #error_page 500 502 503 504 /50x.html;
  25.  
  26.     #location = /50x.html {
  27.         #root /usr/share/nginx/html;
  28.     #}
  29.  
  30.     # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  31.     #
  32.  
  33.     #location ~ \.php$ {
  34.         #proxy_pass http://127.0.0.1:80;
  35.     #}
  36.  
  37.     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  38.     #
  39.  
  40.     location ~ \.php$ {
  41.          try_files $uri =404;
  42.          #fastcgi_split_path_info ^(.+\.php)(/.+)$;
  43.          #root html/fsm;
  44.          fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  45.          fastcgi_index index.php;
  46.          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  47.          include fastcgi_params;
  48.          #fastcgi_intercept_errors on;
  49.     }
  50.  
  51.     # deny access to .htaccess files, if Apache's document root concurs with nginx's one
  52.     #
  53.  
  54.     location ~ /\.ht {
  55.          deny all;
  56.     }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement