Closed shaneseaton closed 8 years ago
Yes, that's necessary. I like it!
Let's see what I can do!
Implemented, please read Readme for details!
You can control the type of substitution with the quotes around environment variables:
-e "SERVER1PROXY2HEADER2=X-Script-Name ${SERVER2REVERSE_PROXY_LOCATION2}"
will be substituted-e 'SERVER1PROXY2HEADER2=X-Script-Name $host'
will NOT be substituted
Hi,
I found your container really useful. The only thing I've found missing is the ability to set headers through the environment variables. Something like:
SERVER[num]PROXY[num]HEADER[num] = ""
$ docker run -d \ -p 80:80 \ --name nginx \ -e "SERVER1REVERSE_PROXY_LOCATION1=/" \ -e "SERVER1REVERSE_PROXY_PASS1=http://www.heise.de" \ -e "SERVER2SERVER_NAME=dummy.example.com" -e "SERVER2REVERSE_PROXY_LOCATION2=/alternate" \ -e "SERVER2REVERSE_PROXY_PASS2=http://www.alternate.de" \ -e "SERVER1PROXY1HEADER1=X-Forwarded-For $proxy_add_x_forwarded_for" \ -e "SERVER1PROXY1HEADER2=X-Script-Name /" \ -e "SERVER1PROXY2HEADER1=X-Forwarded-For $proxy_add_x_forwarded_for" \ -e "SERVER1PROXY2HEADER2=X-Script-Name /alternate" \ blacklabelops/nginx
Thoughts? Would be cool if you could use env variable substitution too.
but that might be asking a bit much :)
Cheers, Shane.