no-php.stpl 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #=======================================================================#
  2. # Default Web Domain Template #
  3. # DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
  4. #=======================================================================#
  5. server {
  6. listen %ip%:%web_ssl_port% ssl http2;
  7. server_name %domain_idn% %alias_idn%;
  8. root %sdocroot%;
  9. index index.php index.html index.htm;
  10. access_log /var/log/nginx/domains/%domain%.log combined;
  11. access_log /var/log/nginx/domains/%domain%.bytes bytes;
  12. error_log /var/log/nginx/domains/%domain%.error.log error;
  13. ssl_certificate %ssl_pem%;
  14. ssl_certificate_key %ssl_key%;
  15. ssl_stapling on;
  16. ssl_stapling_verify on;
  17. include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
  18. types {
  19. text/html html htm shtml php php5;
  20. }
  21. location / {
  22. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  23. expires max;
  24. fastcgi_hide_header "Set-Cookie";
  25. }
  26. }
  27. location /error/ {
  28. alias %home%/%user%/web/%domain%/document_errors/;
  29. }
  30. location ~* "/\.(htaccess|htpasswd)$" {
  31. deny all;
  32. return 404;
  33. }
  34. location /vstats/ {
  35. alias %home%/%user%/web/%domain%/stats/;
  36. include %home%/%user%/web/%domain%/stats/auth.conf*;
  37. }
  38. include /etc/nginx/conf.d/phpmyadmin.inc*;
  39. include /etc/nginx/conf.d/phppgadmin.inc*;
  40. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  41. }