My question is similar to http://stackoverflow.com/questions/869001/how-to-serve-all-existing-static-files-directly-with-nginx-but-proxy-to-apache,different is that my site directory structure looks like this: /nginxRoot/test/js /nginxRoot/test/images /nginxRoot/test/html ........ So the site root isn't "/nginxRoot/" but "/nginxRoot/test/" I want toby AlexLuya - Nginx Mailing List - English
upstream apache { server 127.0.0.1:8080; } # in your server block: server{ # location matching is prioritized by accuracy and order of definition location ~* ^/service/(.*)$ { proxy_pass http://apache/$1; proxy_redirect off; } } ------------------------------------------------------------------------------- Above snippet worksby AlexLuya - How to...
thanks, I removed "permanent",same resultby AlexLuya - How to...
I want to all requests that target at urls with string "serive" can be redirect to another server that run at different port:8080,for example: .................................................................................................................................................................................................................... http://localhost/service/image--by AlexLuya - How to...