cms_made_simple.tpl 2.0 KB

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