hosting.stpl 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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_ssl_port% ssl http2;
  8. server_name %domain_idn% %alias_idn%;
  9. ssl_certificate %ssl_pem%;
  10. ssl_certificate_key %ssl_key%;
  11. ssl_stapling on;
  12. ssl_stapling_verify on;
  13. error_log /var/log/%web_system%/domains/%domain%.error.log error;
  14. include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
  15. location / {
  16. proxy_pass https://%ip%:%web_ssl_port%;
  17. location ~* ^.+\.(%proxy_extensions%)$ {
  18. root %sdocroot%;
  19. access_log /var/log/%web_system%/domains/%domain%.log combined;
  20. access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
  21. expires max;
  22. try_files $uri @fallback;
  23. }
  24. }
  25. location /error/ {
  26. alias %home%/%user%/web/%domain%/document_errors/;
  27. }
  28. location @fallback {
  29. proxy_pass https://%ip%:%web_ssl_port%;
  30. }
  31. location ~ /\.(?!well-known\/|file) {
  32. deny all;
  33. return 404;
  34. }
  35. disable_symlinks if_not_owner from=%docroot%;
  36. proxy_hide_header Upgrade;
  37. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  38. }