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.

67 lines
1.9 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 ~* ^/uploads/.*$ {
  17. expires max;
  18. proxy_pass $uploads_upstream;
  19. }
  20. 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)$ {
  21. access_log off;
  22. }
  23. location ~ [^/]\.php(/|$) {
  24. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  25. if (!-f $document_root$fastcgi_script_name) {
  26. return 404;
  27. }
  28. include fastcgi_params;
  29. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  30. fastcgi_param PATH_INFO $fastcgi_path_info;
  31. fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  32. fastcgi_pass fpm74;
  33. fastcgi_index index.php;
  34. fastcgi_read_timeout 3000;
  35. }
  36. }
  37. server {
  38. server_name
  39. wp.local.wpstudio.ru
  40. ;
  41. listen 80;
  42. root $root;
  43. index index.html index.htm index.php;
  44. location / {
  45. try_files $uri $uri/ /index.php?$args;
  46. }
  47. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  48. 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)$ {
  49. access_log off;
  50. }
  51. location ~ [^/]\.php(/|$) {
  52. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  53. if (!-f $document_root$fastcgi_script_name) {
  54. return 404;
  55. }
  56. include fastcgi_params;
  57. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  58. fastcgi_param PATH_INFO $fastcgi_path_info;
  59. fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  60. fastcgi_pass fpm74;
  61. fastcgi_index index.php;
  62. fastcgi_read_timeout 3000;
  63. }
  64. }