default.tpl 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. %<i4 listen %proxy_ipv4%:%proxy_port%;i4>%
  8. %<i6 listen %proxy_ipv6%:%proxy_port%;i6>%
  9. server_name %domain_idn% %alias_idn%;
  10. include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
  11. location / {
  12. proxy_pass http://%web_ip%:%web_port%;
  13. location ~* ^.+\.(%proxy_extensions%)$ {
  14. root %docroot%;
  15. access_log /var/log/%web_system%/domains/%domain%.log combined;
  16. access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
  17. expires max;
  18. try_files $uri @fallback;
  19. }
  20. }
  21. location /error/ {
  22. alias %home%/%user%/web/%domain%/document_errors/;
  23. }
  24. location @fallback {
  25. proxy_pass http://%web_ip%:%web_port%;
  26. }
  27. location ~ /\.(?!well-known\/|file) {
  28. deny all;
  29. return 404;
  30. }
  31. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  32. }