codeigniter2.tpl 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. fastcgi_param SCRIPT_FILENAME /var/www/html/ci$fastcgi_script_name;
  28. include /etc/nginx/fastcgi_params;
  29. }
  30. }
  31. location ~ \.php$ {
  32. return 444;
  33. }
  34. location /error/ {
  35. alias %home%/%user%/web/%domain%/document_errors/;
  36. }
  37. location ~* "/\.(htaccess|htpasswd)$" {
  38. deny all;
  39. return 404;
  40. }
  41. location /vstats/ {
  42. alias %home%/%user%/web/%domain%/stats/;
  43. include %home%/%user%/web/%domain%/stats/auth.conf*;
  44. }
  45. include /etc/nginx/conf.d/phpmyadmin.inc*;
  46. include /etc/nginx/conf.d/phppgadmin.inc*;
  47. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  48. }