codeigniter.tpl 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #=======================================================================#
  2. # Default Web Domain Template #
  3. # DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
  4. #=======================================================================#
  5. server {
  6. listen %ip%:%web_port%;
  7. server_name %domain_idn% %alias_idn%;
  8. root %docroot%;
  9. index index.php index.html index.htm;
  10. access_log /var/log/nginx/domains/%domain%.log combined;
  11. access_log /var/log/nginx/domains/%domain%.bytes bytes;
  12. error_log /var/log/nginx/domains/%domain%.error.log error;
  13. include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
  14. location = /favicon.ico {
  15. log_not_found off;
  16. access_log off;
  17. }
  18. location = /robots.txt {
  19. allow all;
  20. log_not_found off;
  21. access_log off;
  22. }
  23. location ~ /\.(?!well-known\/) {
  24. deny all;
  25. return 404;
  26. }
  27. location ~ /(application|system|README.md|CHANGELOG.md|LICENSE) {
  28. deny all;
  29. return 404;
  30. }
  31. location / {
  32. try_files $uri $uri/ /index.php;
  33. location ~* ^.+\.(ogg|ogv|svg|svgz|swf|eot|otf|woff|woff2|mov|mp3|mp4|webm|flv|ttf|rss|atom|jpg|jpeg|gif|png|ico|bmp|mid|midi|wav|rtf|css|js|jar)$ {
  34. expires 30d;
  35. fastcgi_hide_header "Set-Cookie";
  36. }
  37. location ~ [^/]\.php(/|$) {
  38. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  39. try_files $uri =404;
  40. fastcgi_pass %backend_lsnr%;
  41. fastcgi_index index.php;
  42. include /etc/nginx/fastcgi_params;
  43. include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf*;
  44. }
  45. }
  46. location /error/ {
  47. alias %home%/%user%/web/%domain%/document_errors/;
  48. }
  49. location /vstats/ {
  50. alias %home%/%user%/web/%domain%/stats/;
  51. include %home%/%user%/web/%domain%/stats/auth.conf*;
  52. }
  53. include /etc/nginx/conf.d/phpmyadmin.inc*;
  54. include /etc/nginx/conf.d/phppgadmin.inc*;
  55. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  56. }