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