pyrocms.tpl 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #=========================================================================#
  2. # Default Web Domain Template #
  3. # DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
  4. # https://hestiacp.com/docs/server-administration/web-templates.html #
  5. #=========================================================================#
  6. server {
  7. listen %ip%:%web_port%;
  8. server_name %domain_idn% %alias_idn%;
  9. root %docroot%/public;
  10. index index.php index.html index.htm;
  11. access_log /var/log/nginx/domains/%domain%.log combined;
  12. access_log /var/log/nginx/domains/%domain%.bytes bytes;
  13. error_log /var/log/nginx/domains/%domain%.error.log error;
  14. include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
  15. location ~ /\.(?!well-known\/) {
  16. deny all;
  17. return 404;
  18. }
  19. location /installer {
  20. try_files $uri $uri/ /installer/index.php?$query_string;
  21. }
  22. location / {
  23. try_files $uri $uri/ /index.php;
  24. location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
  25. expires max;
  26. fastcgi_hide_header "Set-Cookie";
  27. }
  28. location ~ [^/]\.php(/|$) {
  29. try_files $uri =404;
  30. include /etc/nginx/fastcgi_params;
  31. fastcgi_index index.php;
  32. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  33. fastcgi_pass %backend_lsnr%;
  34. include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
  35. }
  36. }
  37. location = /robots.txt { access_log off; log_not_found off; }
  38. location = /favicon.ico { access_log off; log_not_found off; }
  39. #location ~ /\. { access_log off; log_not_found off; deny all; }
  40. location ~ ~$ { access_log off; log_not_found off; deny all; }
  41. location /error/ {
  42. alias %home%/%user%/web/%domain%/document_errors/;
  43. }
  44. location /vstats/ {
  45. alias %home%/%user%/web/%domain%/stats/;
  46. include %home%/%user%/web/%domain%/stats/auth.conf*;
  47. }
  48. include /etc/nginx/conf.d/phpmyadmin.inc*;
  49. include /etc/nginx/conf.d/phppgadmin.inc*;
  50. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  51. }