codeigniter2.tpl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 / {
  15. try_files $uri $uri/ /index.php;
  16. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  17. expires max;
  18. fastcgi_hide_header "Set-Cookie";
  19. }
  20. location = /index.php {
  21. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  22. if (!-f $document_root$fastcgi_script_name) {
  23. return 404;
  24. }
  25. fastcgi_pass %backend_lsnr%;
  26. fastcgi_index index.php;
  27. include /etc/nginx/fastcgi_params;
  28. include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf;
  29. fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
  30. }
  31. }
  32. location ~ \.php$ {
  33. return 444;
  34. }
  35. location /error/ {
  36. alias %home%/%user%/web/%domain%/document_errors/;
  37. }
  38. location ~ /\.(?!well-known\/) {
  39. deny all;
  40. return 404;
  41. }
  42. location /vstats/ {
  43. alias %home%/%user%/web/%domain%/stats/;
  44. include %home%/%user%/web/%domain%/stats/auth.conf*;
  45. }
  46. include /etc/nginx/conf.d/phpmyadmin.inc*;
  47. include /etc/nginx/conf.d/phppgadmin.inc*;
  48. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  49. }