pyrocms.stpl 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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_ssl_port% ssl http2;
  7. server_name %domain_idn% %alias_idn%;
  8. root %sdocroot%/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. ssl_certificate %ssl_pem%;
  14. ssl_certificate_key %ssl_key%;
  15. ssl_stapling on;
  16. ssl_stapling_verify on;
  17. include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
  18. location /installer {
  19. try_files $uri $uri/ /installer/index.php?$query_string;
  20. }
  21. location / {
  22. try_files $uri $uri/ /index.php;
  23. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  24. expires max;
  25. fastcgi_hide_header "Set-Cookie";
  26. }
  27. location ~ [^/]\.php(/|$) {
  28. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  29. if (!-f $document_root$fastcgi_script_name) {
  30. return 404;
  31. }
  32. fastcgi_pass %backend_lsnr%;
  33. fastcgi_index index.php;
  34. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  35. include /etc/nginx/fastcgi_params;
  36. }
  37. }
  38. location = /robots.txt { access_log off; log_not_found off; }
  39. location = /favicon.ico { access_log off; log_not_found off; }
  40. location ~ /\. { access_log off; log_not_found off; deny all; }
  41. location ~ ~$ { access_log off; log_not_found off; deny all; }
  42. location /error/ {
  43. alias %home%/%user%/web/%domain%/document_errors/;
  44. }
  45. location ~* "/\.(htaccess|htpasswd)$" {
  46. deny all;
  47. return 404;
  48. }
  49. location /vstats/ {
  50. alias %home%/%user%/web/%domain%/stats/;
  51. include %home%/%user%/web/%domain%/stats/auth.conf*;
  52. }
  53. include /etc/nginx/conf.d/phpmyadmin.inc*;
  54. include /etc/nginx/conf.d/phppgadmin.inc*;
  55. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  56. }