pyrocms.stpl 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. server {
  2. listen %ip%:%web_ssl_port%;
  3. server_name %domain_idn% %alias_idn%;
  4. root %sdocroot%/public;
  5. index index.php index.html index.htm;
  6. access_log /var/log/nginx/domains/%domain%.log combined;
  7. access_log /var/log/nginx/domains/%domain%.bytes bytes;
  8. error_log /var/log/nginx/domains/%domain%.error.log error;
  9. ssl on;
  10. ssl_certificate %ssl_pem%;
  11. ssl_certificate_key %ssl_key%;
  12. location /installer {
  13. try_files $uri $uri/ /installer/index.php?$query_string;
  14. }
  15. location / {
  16. try_files $uri $uri/ /index.php;
  17. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  18. expires max;
  19. }
  20. location ~ [^/]\.php(/|$) {
  21. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  22. if (!-f $document_root$fastcgi_script_name) {
  23. return 404;
  24. }
  25. fastcgi_pass %backend_lsnr%;
  26. fastcgi_index index.php;
  27. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  28. include /etc/nginx/fastcgi_params;
  29. }
  30. }
  31. location = /robots.txt { access_log off; log_not_found off; }
  32. location = /favicon.ico { access_log off; log_not_found off; }
  33. location ~ /\. { access_log off; log_not_found off; deny all; }
  34. location ~ ~$ { access_log off; log_not_found off; deny all; }
  35. error_page 403 /error/404.html;
  36. error_page 404 /error/404.html;
  37. error_page 500 502 503 504 /error/50x.html;
  38. location /error/ {
  39. alias %home%/%user%/web/%domain%/document_errors/;
  40. }
  41. location ~* "/\.(htaccess|htpasswd)$" {
  42. deny all;
  43. return 404;
  44. }
  45. location /vstats/ {
  46. alias %home%/%user%/web/%domain%/stats/;
  47. include %home%/%user%/conf/web/%domain%.auth*;
  48. }
  49. include /etc/nginx/conf.d/phpmyadmin.inc*;
  50. include /etc/nginx/conf.d/phppgadmin.inc*;
  51. include /etc/nginx/conf.d/webmail.inc*;
  52. include %home%/%user%/conf/web/snginx.%domain%.conf*;
  53. }