default.tpl 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. 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. }