pyrocms.tpl 2.0 KB

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