Advertisement
Guest User

Untitled

a guest
Jan 31st, 2016
1,192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. server {
  2. listen 9000;
  3.  
  4.  
  5. root /root/xyz;
  6.  
  7. autoindex on;
  8.  
  9. server_name test;
  10.  
  11.  
  12.  
  13. rewrite ^([^.]*[^/])$ $1/ permanent;
  14.  
  15.  
  16. location ~ ./$ { rewrite ^(.+)/$ $1 last; }
  17.  
  18. location / {
  19.  
  20. try_files $uri $uri.html @php;
  21.  
  22. }
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. location ~ \.php$ {
  30. rewrite ^(.*)\.php$ $1/ last;
  31. }
  32.  
  33.  
  34. location @php {
  35. try_files $uri.php $uri/index.php =404;
  36. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  37. include /etc/nginx/fastcgi_params;
  38. fastcgi_index index.php;
  39. fastcgi_param SCRIPT_FILENAME /root/xyz$fastcgi_script_name;
  40. }
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement