Advertisement
Jonatanpn

Untitled

Dec 1st, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. server {
  2. server_name 10.0.0.1;
  3. root /var/www/example.com;
  4. index index.php index.html index.htm;
  5.  
  6. location / {
  7. try_files $uri $uri/ /index.php?$args;
  8. }
  9. error_page 404 /404.html;
  10. error_page 500 502 503 504 /50x.html;
  11. location = /50x.html {
  12. root /usr/share/nginx/html;
  13. }
  14.  
  15. location ~ \.php$ {
  16. try_files $uri =404;
  17. fastcgi_pass 127.0.0.1:9000;
  18. fastcgi_index index.php;
  19. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  20. include fastcgi_params;
  21. }
  22.  
  23. location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
  24. expires max;
  25. log_not_found off;
  26. }
  27. location = /robots.txt {
  28. allow all;
  29. log_not_found off;
  30. access_log off;
  31. }
  32.  
  33. location ~ /\.ht {
  34. deny all;
  35. }
  36. location ~ ^/(status|ping)$ {
  37. allow 127.0.0.1;
  38. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  39. fastcgi_index index.php;
  40. include fastcgi_params;
  41. fastcgi_pass 127.0.0.1:9000;
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement