pyrocms.tpl 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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%:%web_port%;
  7. server_name %domain_idn% %alias_idn%;
  8. root %docroot%/public;
  9. index index.php index.html index.htm;
  10. access_log /var/log/nginx/domains/%domain%.log combined;
  11. access_log /var/log/nginx/domains/%domain%.bytes bytes;
  12. error_log /var/log/nginx/domains/%domain%.error.log error;
  13. include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
  14. location /installer {
  15. try_files $uri $uri/ /installer/index.php?$query_string;
  16. }
  17. location / {
  18. try_files $uri $uri/ /index.php;
  19. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  20. expires max;
  21. fastcgi_hide_header "Set-Cookie";
  22. }
  23. location ~ [^/]\.php(/|$) {
  24. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  25. if (!-f $document_root$fastcgi_script_name) {
  26. return 404;
  27. }
  28. fastcgi_pass %backend_lsnr%;
  29. fastcgi_index index.php;
  30. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  31. include /etc/nginx/fastcgi_params;
  32. }
  33. }
  34. location = /robots.txt { access_log off; log_not_found off; }
  35. location = /favicon.ico { access_log off; log_not_found off; }
  36. location ~ /\. { access_log off; log_not_found off; deny all; }
  37. location ~ ~$ { access_log off; log_not_found off; deny all; }
  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%/web/%domain%/stats/auth.conf*;
  48. }
  49. include /etc/nginx/conf.d/phpmyadmin.inc*;
  50. include /etc/nginx/conf.d/phppgadmin.inc*;
  51. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  52. }