no-php.stpl 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #=========================================================================#
  2. # Default Web Domain Template #
  3. # DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
  4. # https://hestiacp.com/docs/server-administration/web-templates.html #
  5. #=========================================================================#
  6. server {
  7. listen %ip%:%web_ssl_port% ssl;
  8. server_name %domain_idn% %alias_idn%;
  9. root %sdocroot%;
  10. index index.php index.html index.htm;
  11. access_log /var/log/nginx/domains/%domain%.log combined;
  12. access_log /var/log/nginx/domains/%domain%.bytes bytes;
  13. error_log /var/log/nginx/domains/%domain%.error.log error;
  14. ssl_certificate %ssl_pem%;
  15. ssl_certificate_key %ssl_key%;
  16. ssl_stapling on;
  17. ssl_stapling_verify on;
  18. # TLS 1.3 0-RTT anti-replay
  19. if ($anti_replay = 307) { return 307 https://$host$request_uri; }
  20. if ($anti_replay = 425) { return 425; }
  21. include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
  22. location ~ /\.(?!well-known\/) {
  23. deny all;
  24. return 404;
  25. }
  26. location / {
  27. location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
  28. expires max;
  29. fastcgi_hide_header "Set-Cookie";
  30. }
  31. }
  32. location ~ [^/]\.php(/|$) {
  33. types { } default_type "text/html";
  34. }
  35. location /error/ {
  36. alias %home%/%user%/web/%domain%/document_errors/;
  37. }
  38. location /vstats/ {
  39. alias %home%/%user%/web/%domain%/stats/;
  40. include %home%/%user%/web/%domain%/stats/auth.conf*;
  41. }
  42. proxy_hide_header Upgrade;
  43. include /etc/nginx/conf.d/phpmyadmin.inc*;
  44. include /etc/nginx/conf.d/phppgadmin.inc*;
  45. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  46. }