wordpress.tpl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
  10. location = /favicon.ico {
  11. log_not_found off;
  12. access_log off;
  13. }
  14. location = /robots.txt {
  15. allow all;
  16. log_not_found off;
  17. access_log off;
  18. }
  19. location / {
  20. try_files $uri $uri/ /index.php?$args;
  21. if (!-e $request_filename)
  22. {
  23. rewrite ^(.+)$ /index.php?q=$1 last;
  24. }
  25. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  26. expires max;
  27. }
  28. location ~ [^/]\.php(/|$) {
  29. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  30. if (!-f $document_root$fastcgi_script_name) {
  31. return 404;
  32. }
  33. fastcgi_pass %backend_lsnr%;
  34. fastcgi_index index.php;
  35. include /etc/nginx/fastcgi_params;
  36. }
  37. }
  38. error_page 403 /error/404.html;
  39. error_page 404 /error/404.html;
  40. error_page 500 502 503 504 /error/50x.html;
  41. location /error/ {
  42. alias %home%/%user%/web/%domain%/document_errors/;
  43. }
  44. location ~* "/\.(htaccess|htpasswd)$" {
  45. deny all;
  46. return 404;
  47. }
  48. location /vstats/ {
  49. alias %home%/%user%/web/%domain%/stats/;
  50. include %home%/%user%/web/%domain%/stats/auth.conf*;
  51. }
  52. include /etc/nginx/conf.d/phpmyadmin.inc*;
  53. include /etc/nginx/conf.d/phppgadmin.inc*;
  54. include /etc/nginx/conf.d/webmail.inc*;
  55. include %home%/%user%/conf/web/%domain%/nginx.conf_*;
  56. }