Advertisement
Guest User

Untitled

a guest
Jan 31st, 2016
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. rewrite ^([^.]*[^/])$ $1/ permanent;
  2.  
  3.  
  4. location ~ ./$ { rewrite ^(.+)/$ $1 last; }
  5.  
  6. location / {
  7.  
  8. try_files $uri $uri.htm @extensionless-php;
  9.  
  10. }
  11.  
  12.  
  13. location @extensionless-php {
  14. rewrite ^(.*)$ $1.php last;
  15. }
  16.  
  17.  
  18.  
  19.  
  20. location ~ \.php$ {
  21. try_files $uri $uri.php $uri/index.php =404;
  22. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  23. include /etc/nginx/fastcgi_params;
  24. fastcgi_index index.php;
  25. fastcgi_param SCRIPT_FILENAME /root/directory$fastcgi_script_name;
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement