default.tpl 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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_port%;
  7. server_name %domain_idn% %alias_idn%;
  8. include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
  9. location / {
  10. proxy_pass http://%ip%:%web_port%;
  11. location ~* ^.+\.(%proxy_extentions%)$ {
  12. root %docroot%;
  13. access_log /var/log/%web_system%/domains/%domain%.log combined;
  14. access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
  15. expires max;
  16. try_files $uri @fallback;
  17. }
  18. }
  19. location /error/ {
  20. alias %home%/%user%/web/%domain%/document_errors/;
  21. }
  22. location @fallback {
  23. proxy_pass http://%ip%:%web_port%;
  24. }
  25. location ~ /\.ht {return 404;}
  26. location ~ /\.svn/ {return 404;}
  27. location ~ /\.git/ {return 404;}
  28. location ~ /\.hg/ {return 404;}
  29. location ~ /\.bzr/ {return 404;}
  30. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  31. }