no-php.tpl 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. server {
  2. listen %ip%:%web_port%;
  3. server_name %domain_idn% %alias_idn%;
  4. root %docroot%;
  5. index index.php index.html index.htm;
  6. access_log /var/log/nginx/domains/%domain%.log combined;
  7. access_log /var/log/nginx/domains/%domain%.bytes bytes;
  8. error_log /var/log/nginx/domains/%domain%.error.log error;
  9. types {
  10. text/html html htm shtml php php5;
  11. }
  12. location / {
  13. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  14. expires max;
  15. }
  16. }
  17. error_page 403 /error/404.html;
  18. error_page 404 /error/404.html;
  19. error_page 500 502 503 504 /error/50x.html;
  20. location /error/ {
  21. alias %home%/%user%/web/%domain%/document_errors/;
  22. }
  23. location ~* "/\.(htaccess|htpasswd)$" {
  24. deny all;
  25. return 404;
  26. }
  27. location /vstats/ {
  28. alias %home%/%user%/web/%domain%/stats/;
  29. include %home%/%user%/conf/web/%domain%.auth*;
  30. }
  31. include /etc/nginx/conf.d/phpmyadmin.inc*;
  32. include /etc/nginx/conf.d/phppgadmin.inc*;
  33. include /etc/nginx/conf.d/webmail.inc*;
  34. include %home%/%user%/conf/web/nginx.%domain%.conf*;
  35. }