I'm trying to
redirect all traffic from www.example.com and example.com to old-www.website.com
proxy all traffic from example.com/forum (and www) to forum server @ 192.168.100.100
I've tried the following config but it keeps returning me to my old website When I remove the location / the forum is not loading and I'm getting 404's since the server is trying to load files @ example.com/ instead of example.com/forum
server { listen 80; server_name www.example.com example.com; location /forum/ { proxy_pass http://192.168.100.100/; proxy_redirect off; proxy_set_header Host $host; } location / { return 302 $scheme://www.old-site.com; } } how can I fix this?