default.stpl 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #=======================================================================#
  2. # Default Web Domain Template #
  3. # DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
  4. #=======================================================================#
  5. server {
  6. listen %ip%:%proxy_ssl_port% ssl http2;
  7. server_name %domain_idn% %alias_idn%;
  8. ssl_certificate %ssl_pem%;
  9. ssl_certificate_key %ssl_key%;
  10. ssl_stapling on;
  11. ssl_stapling_verify on;
  12. error_log /var/log/%web_system%/domains/%domain%.error.log error;
  13. include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
  14. location / {
  15. proxy_pass https://%ip%:%web_ssl_port%;
  16. location ~* ^.+\.(%proxy_extentions%)$ {
  17. root %sdocroot%;
  18. access_log /var/log/%web_system%/domains/%domain%.log combined;
  19. access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
  20. expires max;
  21. try_files $uri @fallback;
  22. }
  23. }
  24. location /error/ {
  25. alias %home%/%user%/web/%domain%/document_errors/;
  26. }
  27. location @fallback {
  28. proxy_pass https://%ip%:%web_ssl_port%;
  29. }
  30. location ~ /\.ht {return 404;}
  31. location ~ /\.svn/ {return 404;}
  32. location ~ /\.git/ {return 404;}
  33. location ~ /\.hg/ {return 404;}
  34. location ~ /\.bzr/ {return 404;}
  35. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  36. }