nginx_default.stpl 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. server {
  2. listen %ip%:%proxy_ssl_port%;
  3. server_name %domain_idn% %alias_idn%;
  4. ssl on;
  5. ssl_certificate %ssl_pem%;
  6. ssl_certificate_key %ssl_key%;
  7. %elog%error_log /var/log/httpd/domains/%domain%.error.log error;
  8. location / {
  9. proxy_pass https://%ip%:%web_ssl_port%;
  10. location ~* ^.+\.(%nginx_extentions%)$ {
  11. root %sdocroot%;
  12. access_log /var/log/httpd/domains/%domain%.log combined;
  13. access_log /var/log/httpd/domains/%domain%.bytes bytes;
  14. expires max;
  15. try_files $uri @fallback;
  16. }
  17. }
  18. location /error/ {
  19. alias %home%/%user%/web/%domain%/document_errors/;
  20. }
  21. location @fallback {
  22. proxy_pass https://%ip%:%web_ssl_port%;
  23. }
  24. location ~ /\.ht {return 404;}
  25. location ~ /\.svn/ {return 404;}
  26. location ~ /\.git/ {return 404;}
  27. location ~ /\.hg/ {return 404;}
  28. location ~ /\.bzr/ {return 404;}
  29. include %home%/%user%/conf/snginx.%domain%.conf*;
  30. }