How can I setup nginx to reverse proxy a single folder to one server and the rest of root to a different server?
The root "/" is managed by CMS while the "other" is my own programs (independent of the CMS).
Here is my current configuration
server {
listen 80;
server_name www.example.com;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443;
... <ssl stuff> ...
server_name www.example.com;
location /other {
proxy_pass http://192.168.2.2/other ;
}
location / {
proxy_pass http://192.168.1.1;
}
}