wordpress.tpl 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. include %home%/%user%/conf/web/%domain%/nginx.fastcgi_cache.conf;
  42. }
  43. }
  44. location /error/ {
  45. alias %home%/%user%/web/%domain%/document_errors/;
  46. }
  47. location ~ /\.(?!well-known\/) {
  48. deny all;
  49. return 404;
  50. }
  51. location /vstats/ {
  52. alias %home%/%user%/web/%domain%/stats/;
  53. include %home%/%user%/web/%domain%/stats/auth.conf*;
  54. }
  55. include /etc/nginx/conf.d/phpmyadmin.inc*;
  56. include /etc/nginx/conf.d/phppgadmin.inc*;
  57. include /etc/nginx/conf.d/webmail.inc*;
  58. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  59. }