pyrocms.stpl 2.1 KB

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