pyrocms.stpl 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf;
  37. }
  38. }
  39. location = /robots.txt { access_log off; log_not_found off; }
  40. location = /favicon.ico { access_log off; log_not_found off; }
  41. location ~ /\. { access_log off; log_not_found off; deny all; }
  42. location ~ ~$ { access_log off; log_not_found off; deny all; }
  43. location /error/ {
  44. alias %home%/%user%/web/%domain%/document_errors/;
  45. }
  46. location ~ /\.(?!well-known\/) {
  47. deny all;
  48. return 404;
  49. }
  50. location /vstats/ {
  51. alias %home%/%user%/web/%domain%/stats/;
  52. include %home%/%user%/web/%domain%/stats/auth.conf*;
  53. }
  54. include /etc/nginx/conf.d/phpmyadmin.inc*;
  55. include /etc/nginx/conf.d/phppgadmin.inc*;
  56. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  57. }