openproject.stpl 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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%:%web_ssl_port% ssl;
  8. server_name %domain_idn% %alias_idn%;
  9. root %sdocroot%;
  10. index index.php index.html index.htm;
  11. access_log /var/log/nginx/domains/%domain%.log combined;
  12. access_log /var/log/nginx/domains/%domain%.bytes bytes;
  13. error_log /var/log/nginx/domains/%domain%.error.log error;
  14. ssl_certificate %ssl_pem%;
  15. ssl_certificate_key %ssl_key%;
  16. #Commented out ssl_stapling directives due to Lets Encrypt ending OCSP support in 2025
  17. #ssl_stapling on;
  18. #ssl_stapling_verify on;
  19. # TLS 1.3 0-RTT anti-replay
  20. if ($anti_replay = 307) { return 307 https://$host$request_uri; }
  21. if ($anti_replay = 425) { return 425; }
  22. include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
  23. location ~ /\.(?!well-known\/) {
  24. deny all;
  25. return 404;
  26. }
  27. location / {
  28. proxy_set_header Host $host;
  29. proxy_set_header Early-Data $rfc_early_data;
  30. proxy_set_header X-Forwarded-Port 443;
  31. proxy_set_header X-Forwarded-Proto https;
  32. proxy_set_header X-Real-IP $remote_addr;
  33. proxy_pass http://127.0.0.1:6000;
  34. }
  35. location /error/ {
  36. alias %home%/%user%/web/%domain%/document_errors/;
  37. }
  38. location /vstats/ {
  39. alias %home%/%user%/web/%domain%/stats/;
  40. include %home%/%user%/web/%domain%/stats/auth.conf*;
  41. }
  42. proxy_hide_header Upgrade;
  43. include /etc/nginx/conf.d/phpmyadmin.inc*;
  44. include /etc/nginx/conf.d/phppgadmin.inc*;
  45. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  46. }