nginx with proxy protocol , ssl handshake failed
Hello everyone ,
I have a nginx webserver behind DO Loadbalance I have around 12 domains in my webserver some domains direct to Loadbalnce’s IP directly and other redirect to it via cloudflare
recently I faced a problem to get client’s Real IP for domain that redirect to the server directly without cloudflare .
I search on this issue and I found that I have to enable Proxy Protocol on the LoadBalance then I have to configure the nginx to accept Proxy Protocol
I follow this tutorial
and I got it done .
but if I add this directive to domain’s nginx configure files
listen 80 proxy_protocol;
all other domains on cloudflare got error ssl handshake failed and not working
how to get proxy_protocol directive work without effect on other domains ?
thank you so much .
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.