drupal6.tpl 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 ~* \.(txt|log)$ {
  24. allow 192.168.0.0/16;
  25. deny all;
  26. }
  27. location ~ \..*/.*\.php$ {
  28. return 403;
  29. }
  30. location ~ ^/sites/.*/private/ {
  31. return 403;
  32. }
  33. location ~ ^/sites/[^/]+/files/.*\.php$ {
  34. deny all;
  35. }
  36. location / {
  37. try_files $uri @rewrite;
  38. }
  39. location @rewrite {
  40. rewrite ^/(.*)$ /index.php?q=$1;
  41. }
  42. location ~ /vendor/.*\.php$ {
  43. deny all;
  44. return 404;
  45. }
  46. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  47. try_files $uri @rewrite;
  48. expires max;
  49. log_not_found off;
  50. }
  51. location ~ ^/sites/.*/files/imagecache/ {
  52. try_files $uri @rewrite;
  53. }
  54. location ~ '\.php$|^/update.php' {
  55. fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
  56. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  57. fastcgi_pass %backend_lsnr%;
  58. include /etc/nginx/fastcgi_params;
  59. }
  60. location /error/ {
  61. alias %home%/%user%/web/%domain%/document_errors/;
  62. }
  63. location ~* "/\.(htaccess|htpasswd)$" {
  64. deny all;
  65. return 404;
  66. }
  67. location /vstats/ {
  68. alias %home%/%user%/web/%domain%/stats/;
  69. include %home%/%user%/web/%domain%/stats/auth.conf*;
  70. }
  71. include /etc/nginx/conf.d/phpmyadmin.inc*;
  72. include /etc/nginx/conf.d/phppgadmin.inc*;
  73. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  74. }