You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.0 KiB

  1. server {
  2. server_name
  3. wp-with-file-proxy.local.wpstudio.ru
  4. ;
  5. listen 80;
  6. root $root;
  7. index index.html index.htm index.php;
  8. location / {
  9. try_files $uri $uri/ /index.php?$args;
  10. }
  11. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  12. location ~* ^/wp-content/uploads/.*$ {
  13. expires max;
  14. proxy_pass $uploads_upstream;
  15. }
  16. location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
  17. access_log off;
  18. }
  19. location ~ [^/]\.php(/|$) {
  20. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  21. if (!-f $document_root$fastcgi_script_name) {
  22. return 404;
  23. }
  24. include fastcgi_params;
  25. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  26. fastcgi_param PATH_INFO $fastcgi_path_info;
  27. fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  28. fastcgi_pass php74;
  29. fastcgi_index index.php;
  30. fastcgi_read_timeout 3000;
  31. }
  32. }
  33. server {
  34. server_name
  35. wp.local.wpstudio.ru
  36. ;
  37. listen 80;
  38. root $root;
  39. index index.html index.htm index.php;
  40. location / {
  41. try_files $uri $uri/ /index.php?$args;
  42. }
  43. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  44. location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
  45. access_log off;
  46. }
  47. location ~ [^/]\.php(/|$) {
  48. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  49. if (!-f $document_root$fastcgi_script_name) {
  50. return 404;
  51. }
  52. include fastcgi_params;
  53. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  54. fastcgi_param PATH_INFO $fastcgi_path_info;
  55. fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  56. fastcgi_pass php74;
  57. fastcgi_index index.php;
  58. fastcgi_read_timeout 3000;
  59. }
  60. }