codeigniter.tpl 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 = /favicon.ico {
  16. log_not_found off;
  17. access_log off;
  18. }
  19. location = /robots.txt {
  20. allow all;
  21. log_not_found off;
  22. access_log off;
  23. }
  24. location ~ /\.(?!well-known\/) {
  25. deny all;
  26. return 404;
  27. }
  28. location ~ /(application|system|README.md|CHANGELOG.md|LICENSE) {
  29. deny all;
  30. return 404;
  31. }
  32. location / {
  33. try_files $uri $uri/ /index.php;
  34. 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)$ {
  35. expires 30d;
  36. fastcgi_hide_header "Set-Cookie";
  37. }
  38. location ~ [^/]\.php(/|$) {
  39. try_files $uri =404;
  40. include /etc/nginx/fastcgi_params;
  41. fastcgi_index index.php;
  42. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  43. fastcgi_pass %backend_lsnr%;
  44. include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
  45. }
  46. }
  47. location /error/ {
  48. alias %home%/%user%/web/%domain%/document_errors/;
  49. }
  50. location /vstats/ {
  51. alias %home%/%user%/web/%domain%/stats/;
  52. include %home%/%user%/web/%domain%/stats/auth.conf*;
  53. }
  54. include /etc/nginx/conf.d/phpmyadmin.inc*;
  55. include /etc/nginx/conf.d/phppgadmin.inc*;
  56. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  57. }