no-php.tpl 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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_port%;
  8. server_name %domain_idn% %alias_idn%;
  9. root %docroot%;
  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. include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
  15. location / {
  16. location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
  17. expires max;
  18. fastcgi_hide_header "Set-Cookie";
  19. }
  20. }
  21. location ~ [^/]\.php(/|$) {
  22. types { } default_type "text/html";
  23. }
  24. location /error/ {
  25. alias %home%/%user%/web/%domain%/document_errors/;
  26. }
  27. location ~ /\.(?!well-known\/) {
  28. deny all;
  29. return 404;
  30. }
  31. location /vstats/ {
  32. alias %home%/%user%/web/%domain%/stats/;
  33. include %home%/%user%/web/%domain%/stats/auth.conf*;
  34. }
  35. include /etc/nginx/conf.d/phpmyadmin.inc*;
  36. include /etc/nginx/conf.d/phppgadmin.inc*;
  37. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  38. }