codeigniter.stpl 2.3 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_ssl_port% ssl;
  8. server_name %domain_idn% %alias_idn%;
  9. root %sdocroot%;
  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. ssl_certificate %ssl_pem%;
  15. ssl_certificate_key %ssl_key%;
  16. ssl_stapling on;
  17. ssl_stapling_verify on;
  18. # TLS 1.3 0-RTT anti-replay
  19. if ($anti_replay = 307) { return 307 https://$host$request_uri; }
  20. if ($anti_replay = 425) { return 425; }
  21. include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
  22. location = /favicon.ico {
  23. log_not_found off;
  24. access_log off;
  25. }
  26. location = /robots.txt {
  27. allow all;
  28. log_not_found off;
  29. access_log off;
  30. }
  31. location ~ /\.(?!well-known\/) {
  32. deny all;
  33. return 404;
  34. }
  35. location ~ /(application|system|README.md|CHANGELOG.md|LICENSE) {
  36. deny all;
  37. return 404;
  38. }
  39. location / {
  40. try_files $uri $uri/ /index.php;
  41. location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|webp|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
  42. expires 30d;
  43. fastcgi_hide_header "Set-Cookie";
  44. }
  45. location ~ [^/]\.php(/|$) {
  46. try_files $uri =404;
  47. include /etc/nginx/fastcgi_params;
  48. fastcgi_index index.php;
  49. fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
  50. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  51. fastcgi_pass %backend_lsnr%;
  52. include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
  53. }
  54. }
  55. location /error/ {
  56. alias %home%/%user%/web/%domain%/document_errors/;
  57. }
  58. location /vstats/ {
  59. alias %home%/%user%/web/%domain%/stats/;
  60. include %home%/%user%/web/%domain%/stats/auth.conf*;
  61. }
  62. proxy_hide_header Upgrade;
  63. include /etc/nginx/conf.d/phpmyadmin.inc*;
  64. include /etc/nginx/conf.d/phppgadmin.inc*;
  65. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  66. }