wordpress2.tpl 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. server {
  2. listen %ip%:%web_port%;
  3. server_name %domain_idn% %alias_idn%;
  4. root %docroot%;
  5. index index.php index.html index.htm;
  6. access_log /var/log/nginx/domains/%domain%.log combined;
  7. access_log /var/log/nginx/domains/%domain%.bytes bytes;
  8. error_log /var/log/nginx/domains/%domain%.error.log error;
  9. location = /favicon.ico {
  10. log_not_found off;
  11. access_log off;
  12. }
  13. location = /robots.txt {
  14. allow all;
  15. log_not_found off;
  16. access_log off;
  17. }
  18. location / {
  19. try_files $uri $uri/ /index.php?$args;
  20. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  21. expires max;
  22. }
  23. location ~ [^/]\.php(/|$) {
  24. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  25. if (!-f $document_root$fastcgi_script_name) {
  26. return 404;
  27. }
  28. fastcgi_pass %backend_lsnr%;
  29. fastcgi_index index.php;
  30. include /etc/nginx/fastcgi_params;
  31. }
  32. }
  33. error_page 403 /error/404.html;
  34. error_page 404 /error/404.html;
  35. error_page 500 502 503 504 /error/50x.html;
  36. location /error/ {
  37. alias %home%/%user%/web/%domain%/document_errors/;
  38. }
  39. location ~* "/\.(htaccess|htpasswd)$" {
  40. deny all;
  41. return 404;
  42. }
  43. location /vstats/ {
  44. alias %home%/%user%/web/%domain%/stats/;
  45. include %home%/%user%/conf/web/%domain%.auth*;
  46. }
  47. include /etc/nginx/conf.d/phpmyadmin.inc*;
  48. include /etc/nginx/conf.d/phppgadmin.inc*;
  49. include /etc/nginx/conf.d/webmail.inc*;
  50. include %home%/%user%/conf/web/nginx.%domain%.conf*;
  51. }