codeigniter3.tpl 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 ~ [^/]\.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 /etc/nginx/fastcgi_params;
  29. include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf;
  30. }
  31. }
  32. location /error/ {
  33. alias %home%/%user%/web/%domain%/document_errors/;
  34. }
  35. location ~ /\.(?!well-known\/) {
  36. deny all;
  37. return 404;
  38. }
  39. location /vstats/ {
  40. alias %home%/%user%/web/%domain%/stats/;
  41. include %home%/%user%/web/%domain%/stats/auth.conf*;
  42. }
  43. include /etc/nginx/conf.d/phpmyadmin.inc*;
  44. include /etc/nginx/conf.d/phppgadmin.inc*;
  45. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  46. }