This is my first time using nginx. I configured a reverse proxy with nginx. The configuration is as follows:
server
{
listen 80;
server_name localhost;
location ~/bbs/ {
proxy_redirect off;
proxy_set_header Host bbs.example.com:8771;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://bbs.example.com:8771;
}
}
I want to realize that when I visit www.example.com/bbs/, I can proxy to http://bbs.example.com:8771, so that the configuration can also be accessed normally. But there is a problem. The forum is jforum. Once I post in the forum, the domain name will still jump back to the actual address http://bbs.example.com:8771. The guess is "proxy_set_header Host bbs.example.com:8771" ;" Problem with this place. Please also answer your questions....
淡淡烟草味2017-05-16 17:24:54
It is recommended to read this article, the content has been replaced.
http://drops.wooyun.org/tips/6403