no-php.tpl 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
  10. types {
  11. text/html html htm shtml php php5;
  12. }
  13. location / {
  14. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  15. expires max;
  16. fastcgi_hide_header "Set-Cookie";
  17. }
  18. }
  19. location /error/ {
  20. alias %home%/%user%/web/%domain%/document_errors/;
  21. }
  22. location ~* "/\.(htaccess|htpasswd)$" {
  23. deny all;
  24. return 404;
  25. }
  26. location /vstats/ {
  27. alias %home%/%user%/web/%domain%/stats/;
  28. include %home%/%user%/web/%domain%/stats/auth.conf*;
  29. }
  30. include /etc/nginx/conf.d/phpmyadmin.inc*;
  31. include /etc/nginx/conf.d/phppgadmin.inc*;
  32. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  33. }