no-php.stpl 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. #Commented out ssl_stapling directives due to Lets Encrypt ending OCSP support in 2025
  17. #ssl_stapling on;
  18. #ssl_stapling_verify on;
  19. # TLS 1.3 0-RTT anti-replay
  20. if ($anti_replay = 307) { return 307 https://$host$request_uri; }
  21. if ($anti_replay = 425) { return 425; }
  22. include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
  23. location ~ /\.(?!well-known\/) {
  24. deny all;
  25. return 404;
  26. }
  27. location / {
  28. location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
  29. expires max;
  30. fastcgi_hide_header "Set-Cookie";
  31. }
  32. }
  33. location ~ [^/]\.php(/|$) {
  34. types { } default_type "text/html";
  35. }
  36. location /error/ {
  37. alias %home%/%user%/web/%domain%/document_errors/;
  38. }
  39. location /vstats/ {
  40. alias %home%/%user%/web/%domain%/stats/;
  41. include %home%/%user%/web/%domain%/stats/auth.conf*;
  42. }
  43. proxy_hide_header Upgrade;
  44. include /etc/nginx/conf.d/phpmyadmin.inc*;
  45. include /etc/nginx/conf.d/phppgadmin.inc*;
  46. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  47. }