default.tpl 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #=========================================================================#
  2. # Default Web Domain Template #
  3. # DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
  4. # https://docs.hestiacp.com/admin_docs/web.html#how-do-web-templates-work #
  5. #=========================================================================#
  6. server {
  7. listen %ip%:%proxy_port%;
  8. server_name %domain_idn% %alias_idn%;
  9. include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
  10. location / {
  11. proxy_pass http://%ip%:%web_port%;
  12. location ~* ^.+\.(%proxy_extensions%)$ {
  13. root %docroot%;
  14. access_log /var/log/%web_system%/domains/%domain%.log combined;
  15. access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
  16. expires max;
  17. try_files $uri @fallback;
  18. }
  19. }
  20. location /error/ {
  21. alias %home%/%user%/web/%domain%/document_errors/;
  22. }
  23. location @fallback {
  24. proxy_pass http://%ip%:%web_port%;
  25. }
  26. location ~ /\.(?!well-known\/|file) {
  27. deny all;
  28. return 404;
  29. }
  30. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  31. }