no-php.stpl 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 http2;
  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. include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
  19. location / {
  20. location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
  21. expires max;
  22. fastcgi_hide_header "Set-Cookie";
  23. }
  24. }
  25. location ~ [^/]\.php(/|$) {
  26. types { } default_type "text/html";
  27. }
  28. location /error/ {
  29. alias %home%/%user%/web/%domain%/document_errors/;
  30. }
  31. location ~ /\.(?!well-known\/) {
  32. deny all;
  33. return 404;
  34. }
  35. location /vstats/ {
  36. alias %home%/%user%/web/%domain%/stats/;
  37. include %home%/%user%/web/%domain%/stats/auth.conf*;
  38. }
  39. proxy_hide_header Upgrade;
  40. include /etc/nginx/conf.d/phpmyadmin.inc*;
  41. include /etc/nginx/conf.d/phppgadmin.inc*;
  42. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  43. }