crazy-max / docker-flarum

Flarum Docker image
MIT License
197 stars 32 forks source link

Support SSL Reverse Proxy #100

Open Yippy opened 11 months ago

Yippy commented 11 months ago

Description

I would like to suggest whether you are able to include a new feature to accept incoming SSL, for example I use HAPROXY to send 'send-proxy-v2'

So for me to be able to get nginx to accept this, I would need to amend the nginx.conf to


        listen 8000 ssl http2 proxy_protocol;

        ssl_certificate     /etc/nginx/ssl/fullchain.cer;
        ssl_certificate_key /etc/nginx/ssl/website.key;

Maybe add a new environment variable:

SSL_PORT=8001
SSL_CERTIFICATE=/etc/nginx/ssl/fullchain.cer
SSL_CERTIFICATE_KEY=/etc/nginx/ssl/website.key
SSL_LISTEN_PROTOCOL=http2 proxy_protocol

Just having the REAL_IP_HEADER for 'proxy_protocol' isn't enough to make a working connection. Thank you for this docker