wordpress.stpl 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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_ssl_port% ssl http2;
  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. ssl_certificate %ssl_pem%;
  14. ssl_certificate_key %ssl_key%;
  15. ssl_stapling on;
  16. ssl_stapling_verify on;
  17. include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
  18. location = /favicon.ico {
  19. log_not_found off;
  20. access_log off;
  21. }
  22. location = /robots.txt {
  23. allow all;
  24. log_not_found off;
  25. access_log off;
  26. }
  27. location / {
  28. try_files $uri $uri/ /index.php?$args;
  29. if (!-e $request_filename)
  30. {
  31. rewrite ^(.+)$ /index.php?q=$1 last;
  32. }
  33. location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
  34. expires max;
  35. fastcgi_hide_header "Set-Cookie";
  36. }
  37. location ~ [^/]\.php(/|$) {
  38. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  39. if (!-f $document_root$fastcgi_script_name) {
  40. return 404;
  41. }
  42. fastcgi_pass %backend_lsnr%;
  43. fastcgi_index index.php;
  44. include /etc/nginx/fastcgi_params;
  45. }
  46. }
  47. location /error/ {
  48. alias %home%/%user%/web/%domain%/document_errors/;
  49. }
  50. location ~* "/\.(htaccess|htpasswd)$" {
  51. deny all;
  52. return 404;
  53. }
  54. location /vstats/ {
  55. alias %home%/%user%/web/%domain%/stats/;
  56. include %home%/%user%/web/%domain%/stats/auth.conf*;
  57. }
  58. include /etc/nginx/conf.d/phpmyadmin.inc*;
  59. include /etc/nginx/conf.d/phppgadmin.inc*;
  60. include /etc/nginx/conf.d/webmail.inc*;
  61. include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
  62. }