codeigniter.stpl 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #=========================================================================#
  2. # Default Web Domain Template #
  3. # DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
  4. # https://docs.hestiacp.com/admin_docs/web.html#how-do-web-templates-work #
  5. #=========================================================================#
  6. server {
  7. listen %ip%:%web_ssl_port% ssl http2;
  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. ssl_certificate %ssl_pem%;
  15. ssl_certificate_key %ssl_key%;
  16. ssl_stapling on;
  17. ssl_stapling_verify on;
  18. include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
  19. location = /favicon.ico {
  20. log_not_found off;
  21. access_log off;
  22. }
  23. location = /robots.txt {
  24. allow all;
  25. log_not_found off;
  26. access_log off;
  27. }
  28. location ~ /\.(?!well-known\/) {
  29. deny all;
  30. return 404;
  31. }
  32. location ~ /(application|system|README.md|CHANGELOG.md|LICENSE) {
  33. deny all;
  34. return 404;
  35. }
  36. location / {
  37. try_files $uri $uri/ /index.php;
  38. 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)$ {
  39. expires 30d;
  40. fastcgi_hide_header "Set-Cookie";
  41. }
  42. location ~ [^/]\.php(/|$) {
  43. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  44. try_files $uri =404;
  45. fastcgi_pass %backend_lsnr%;
  46. fastcgi_index index.php;
  47. include /etc/nginx/fastcgi_params;
  48. include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
  49. }
  50. }
  51. location /error/ {
  52. alias %home%/%user%/web/%domain%/document_errors/;
  53. }
  54. location /vstats/ {
  55. alias %home%/%user%/web/%domain%/stats/;
  56. include %home%/%user%/web/%domain%/stats/auth.conf*;
  57. }
  58. proxy_hide_header Upgrade;
  59. include /etc/nginx/conf.d/phpmyadmin.inc*;
  60. include /etc/nginx/conf.d/phppgadmin.inc*;
  61. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  62. }