Advertisement
Guest User

Untitled

a guest
Nov 1st, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name www.domain.com domain.com;
  4. index index.php;
  5.  
  6. location / {
  7. root /usr/share/nginx/html/domain/;
  8. try_files $uri $uri.html @extensionless-php $uri/ =404;
  9. }
  10.  
  11. location @extensionless-php {
  12. rewrite ^(.*)$ $1.php last;
  13. }
  14.  
  15. location ~ .php$ {
  16. fastcgi_buffers 8 256k;
  17. fastcgi_buffer_size 128k;
  18. fastcgi_intercept_errors on;
  19. include fastcgi_params;
  20. fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/domain/$fastcgi_script_name;
  21. fastcgi_pass unix:/dev/shm/php-fpm-www.sock;
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement