default.tpl 1.1 KB

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