wordpress.tpl 2.1 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_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 / {
  24. try_files $uri $uri/ /index.php?$args;
  25. if (!-e $request_filename)
  26. {
  27. rewrite ^(.+)$ /index.php?q=$1 last;
  28. }
  29. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  30. expires max;
  31. fastcgi_hide_header "Set-Cookie";
  32. }
  33. location ~ [^/]\.php(/|$) {
  34. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  35. if (!-f $document_root$fastcgi_script_name) {
  36. return 404;
  37. }
  38. fastcgi_pass %backend_lsnr%;
  39. fastcgi_index index.php;
  40. include /etc/nginx/fastcgi_params;
  41. }
  42. }
  43. location /error/ {
  44. alias %home%/%user%/web/%domain%/document_errors/;
  45. }
  46. location ~* "/\.(htaccess|htpasswd)$" {
  47. deny all;
  48. return 404;
  49. }
  50. location /vstats/ {
  51. alias %home%/%user%/web/%domain%/stats/;
  52. include %home%/%user%/web/%domain%/stats/auth.conf*;
  53. }
  54. include /etc/nginx/conf.d/phpmyadmin.inc*;
  55. include /etc/nginx/conf.d/phppgadmin.inc*;
  56. include /etc/nginx/conf.d/webmail.inc*;
  57. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  58. }