projectsend.tpl 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. # Add headers to serve security related headers
  16. add_header X-Content-Type-Options nosniff;
  17. add_header X-XSS-Protection "1; mode=block";
  18. add_header X-Robots-Tag none;
  19. add_header X-Download-Options noopen;
  20. add_header X-Permitted-Cross-Domain-Policies none;
  21. add_header Referrer-Policy no-referrer;
  22. location = /robots.txt {
  23. allow all;
  24. log_not_found off;
  25. access_log off;
  26. }
  27. client_max_body_size 512M;
  28. # Disable gzip to avoid the removal of the ETag header
  29. gzip off;
  30. # Uncomment if your server is build with the ngx_pagespeed module
  31. # This module is currently not supported.
  32. #pagespeed off;
  33. error_page 403 /core/templates/403.php;
  34. error_page 404 /core/templates/404.php;
  35. location / {
  36. try_files $uri $uri/ /index.php;
  37. }
  38. location ~ \.php$ {
  39. include fastcgi_params;
  40. fastcgi_split_path_info ^(.+\.php)(/.*)$;
  41. try_files $fastcgi_script_name =404;
  42. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  43. fastcgi_param PATH_INFO $fastcgi_path_info;
  44. #Avoid sending the security headers twice
  45. fastcgi_param modHeadersAvailable true;
  46. fastcgi_param front_controller_active true;
  47. fastcgi_pass unix:/run/php/php7.4-fpm.sock;
  48. fastcgi_intercept_errors on;
  49. fastcgi_request_buffering off;
  50. }
  51. location ~* \.(?:svg|gif|png|webp|html|ttf|woff|ico|jpg|jpeg)$ {
  52. try_files $uri /index.php$uri$is_args$args;
  53. # Optional: Don't log access to other assets
  54. access_log off;
  55. }
  56. location /error/ {
  57. alias %home%/%user%/web/%domain%/document_errors/;
  58. }
  59. location ~ /\.(?!well-known\/) {
  60. deny all;
  61. return 404;
  62. }
  63. location /vstats/ {
  64. alias %home%/%user%/web/%domain%/stats/;
  65. include %home%/%user%/web/%domain%/stats/auth.conf*;
  66. }
  67. include /etc/nginx/conf.d/phpmyadmin.inc*;
  68. include /etc/nginx/conf.d/phppgadmin.inc*;
  69. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  70. }