no-php.stpl 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. server {
  2. listen %ip%:%web_ssl_port%;
  3. server_name %domain_idn% %alias_idn%;
  4. root %sdocroot%;
  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. ssl on;
  10. ssl_certificate %ssl_pem%;
  11. ssl_certificate_key %ssl_key%;
  12. types {
  13. text/html html htm shtml php php5;
  14. }
  15. location / {
  16. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  17. expires max;
  18. }
  19. }
  20. error_page 403 /error/404.html;
  21. error_page 404 /error/404.html;
  22. error_page 500 502 503 504 /error/50x.html;
  23. location /error/ {
  24. alias %home%/%user%/web/%domain%/document_errors/;
  25. }
  26. location ~* "/\.(htaccess|htpasswd)$" {
  27. deny all;
  28. return 404;
  29. }
  30. location /vstats/ {
  31. alias %home%/%user%/web/%domain%/stats/;
  32. include %home%/%user%/conf/web/%domain%.auth*;
  33. }
  34. include /etc/nginx/conf.d/phpmyadmin.inc*;
  35. include /etc/nginx/conf.d/phppgadmin.inc*;
  36. include /etc/nginx/conf.d/webmail.inc*;
  37. include %home%/%user%/conf/web/snginx.%domain%.conf*;
  38. }