wordpress.tpl 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 / {
  10. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  11. expires max;
  12. }
  13. location ~ [^/]\.php(/|$) {
  14. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  15. if (!-f $document_root$fastcgi_script_name) {
  16. return 404;
  17. }
  18. fastcgi_pass %backend_lsnr%;
  19. fastcgi_index index.php;
  20. include /etc/nginx/fastcgi_params;
  21. }
  22. }
  23. error_page 403 /error/404.html;
  24. error_page 404 /error/404.html;
  25. error_page 500 502 503 504 /error/50x.html;
  26. location /error/ {
  27. alias %home%/%user%/web/%domain%/document_errors/;
  28. }
  29. location ~* "/\.(htaccess|htpasswd)$" {
  30. deny all;
  31. return 404;
  32. }
  33. location /vstats/ {
  34. alias %home%/%user%/web/%domain%/stats/;
  35. include %home%/%user%/conf/web/%domain%.auth*;
  36. }
  37. include /etc/nginx/conf.d/phpmyadmin.inc*;
  38. include /etc/nginx/conf.d/phppgadmin.inc*;
  39. include /etc/nginx/conf.d/webmail.inc*;
  40. include %home%/%user%/conf/web/nginx.%domain%.conf*;
  41. }