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.

65 lines
2.1 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_param SERVER_NAME $host;
  29. fastcgi_pass php74;
  30. fastcgi_index index.php;
  31. fastcgi_read_timeout 3000;
  32. }
  33. }
  34. server {
  35. server_name
  36. wp.local.wpstudio.ru
  37. ;
  38. listen 80;
  39. root $root;
  40. index index.html index.htm index.php;
  41. location / {
  42. try_files $uri $uri/ /index.php?$args;
  43. }
  44. rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  45. 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)$ {
  46. access_log off;
  47. }
  48. location ~ [^/]\.php(/|$) {
  49. fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  50. if (!-f $document_root$fastcgi_script_name) {
  51. return 404;
  52. }
  53. include fastcgi_params;
  54. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  55. fastcgi_param PATH_INFO $fastcgi_path_info;
  56. fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  57. fastcgi_param SERVER_NAME $host;
  58. fastcgi_pass php74;
  59. fastcgi_index index.php;
  60. fastcgi_read_timeout 3000;
  61. }
  62. }