OPNsense Forum

English Forums => Web Proxy Filtering and Caching => Topic started by: akong77 on November 04, 2020, 02:54:44 am

Title: Nginx reverse proxy will get "broken header"
Post by: akong77 on November 04, 2020, 02:54:44 am
Hello,
I has setup nginx reverse proxy all done.It's can success to browsers it.
But if I enable OPNSense -- Service -- nginx -- HTTP Server Proxy Protocol and Real IP.It's can't see web page.The Opnsense nginx log will show

Quote
2020/11/04 09:38:24 [error] 36521#100138: *10 broken header: "GET / HTTP/1.1
Host: ab.aspa.idv.tw
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Cookie: tk_or=%22%22; tk_lr=%22%22; _ga=GA1.3.660938322.1583392563; __gads=ID=9f57df3da7e19b8a-22892d044cc40098:T=1603244370:RT=1603244370:S=ALNI_MZFwjrtEaJJTdt4YXsnxyXVPR0Jcw
Upgrade-Insecure-Requests: 1

" while reading PROXY protocol, client: 203.74.122.103, server: 0.0.0.0:80
Could I miss some setup?
Title: Re: Nginx reverse proxy will get "broken header"
Post by: akong77 on November 04, 2020, 05:37:07 am
I hope know if I want web server can show real IP.How to do it?
Title: Re: Nginx reverse proxy will get "broken header"
Post by: fabian on November 04, 2020, 07:15:25 pm
Maybe real IP and trusted proxy in combination is what you look for.
Title: Re: Nginx reverse proxy will get "broken header"
Post by: akong77 on November 05, 2020, 02:49:08 am
The Trust Proxy mean really web server?
Title: Re: Nginx reverse proxy will get "broken header"
Post by: fabian on November 08, 2020, 01:00:42 pm
The trusted proxy is a previous proxy from which the real IP address is accepted.