default.stpl 1.6 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. %<i4 listen %proxy_ipv4%:%proxy_ssl_port% ssl http2;i4>%
  8. %<i6 listen %proxy_ipv6%:%proxy_ssl_port% ssl http2;i6>%
  9. server_name %domain_idn% %alias_idn%;
  10. ssl_certificate %ssl_pem%;
  11. ssl_certificate_key %ssl_key%;
  12. ssl_stapling on;
  13. ssl_stapling_verify on;
  14. error_log /var/log/%web_system%/domains/%domain%.error.log error;
  15. include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
  16. location / {
  17. proxy_pass https://%web_ip%:%web_ssl_port%;
  18. location ~* ^.+\.(%proxy_extensions%)$ {
  19. root %sdocroot%;
  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. try_files $uri @fallback;
  24. }
  25. }
  26. location /error/ {
  27. alias %home%/%user%/web/%domain%/document_errors/;
  28. }
  29. location @fallback {
  30. proxy_pass https://%web_ip%:%web_ssl_port%;
  31. }
  32. location ~ /\.(?!well-known\/|file) {
  33. deny all;
  34. return 404;
  35. }
  36. proxy_hide_header Upgrade;
  37. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  38. }