cms_made_simple.tpl 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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%;
  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 / {
  20. try_files $uri $uri/ /index.php?page=$request_uri;
  21. location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
  22. expires max;
  23. fastcgi_hide_header "Set-Cookie";
  24. }
  25. location ~ [^/]\.php(/|$) {
  26. try_files $uri =404;
  27. include /etc/nginx/fastcgi_params;
  28. fastcgi_index index.php;
  29. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  30. fastcgi_pass %backend_lsnr%;
  31. include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
  32. }
  33. }
  34. location /error/ {
  35. alias %home%/%user%/web/%domain%/document_errors/;
  36. }
  37. location /vstats/ {
  38. alias %home%/%user%/web/%domain%/stats/;
  39. include %home%/%user%/web/%domain%/stats/auth.conf*;
  40. }
  41. include /etc/nginx/conf.d/phpmyadmin.inc*;
  42. include /etc/nginx/conf.d/phppgadmin.inc*;
  43. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  44. }