Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 9000;
- root /root/xyz;
- autoindex on;
- server_name test;
- rewrite ^([^.]*[^/])$ $1/ permanent;
- location ~ ./$ { rewrite ^(.+)/$ $1 last; }
- location / {
- try_files $uri $uri.html @php;
- }
- location ~ \.php$ {
- rewrite ^(.*)\.php$ $1/ last;
- }
- location @php {
- try_files $uri.php $uri/index.php =404;
- fastcgi_pass unix:/run/php/php7.0-fpm.sock;
- include /etc/nginx/fastcgi_params;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME /root/xyz$fastcgi_script_name;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement