codeigniter.stpl 2.2 KB

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