Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- server_name 10.0.0.1;
- root /var/www/example.com;
- index index.php index.html index.htm;
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- error_page 404 /404.html;
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /usr/share/nginx/html;
- }
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
- expires max;
- log_not_found off;
- }
- location = /robots.txt {
- allow all;
- log_not_found off;
- access_log off;
- }
- location ~ /\.ht {
- deny all;
- }
- location ~ ^/(status|ping)$ {
- allow 127.0.0.1;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_pass 127.0.0.1:9000;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement