projectsend.tpl 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. location ~ /\.(?!well-known\/) {
  28. deny all;
  29. return 404;
  30. }
  31. client_max_body_size 512M;
  32. # Disable gzip to avoid the removal of the ETag header
  33. gzip off;
  34. # Uncomment if your server is build with the ngx_pagespeed module
  35. # This module is currently not supported.
  36. #pagespeed off;
  37. error_page 403 /core/templates/403.php;
  38. error_page 404 /core/templates/404.php;
  39. location / {
  40. try_files $uri $uri/ /index.php;
  41. }
  42. location ~ \.php$ {
  43. try_files $fastcgi_script_name =404;
  44. include /etc/nginx/fastcgi_params;
  45. fastcgi_intercept_errors on;
  46. fastcgi_param front_controller_active true;
  47. # Avoid sending the security headers twice
  48. fastcgi_param modHeadersAvailable true;
  49. fastcgi_param PATH_INFO $fastcgi_path_info;
  50. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  51. fastcgi_request_buffering off;
  52. fastcgi_split_path_info ^(.+\.php)(/.*)$;
  53. fastcgi_pass unix:/run/php/php7.4-fpm.sock;
  54. }
  55. location ~* \.(?:svg|gif|png|webp|html|ttf|woff|ico|jpg|jpeg)$ {
  56. try_files $uri /index.php$uri$is_args$args;
  57. # Optional: Don't log access to other assets
  58. access_log off;
  59. }
  60. location /error/ {
  61. alias %home%/%user%/web/%domain%/document_errors/;
  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. }