Comments (9)
The added code to the server section in nginx.tmpl:
{{ $firstContainer := index $containers 0 }}
{{ if $firstContainer.Env.VIRTUAL_ALLOW }}
{{ range $i, $allowed := split $firstContainer.Env.VIRTUAL_ALLOW "," }}
allow {{ $allowed }};
{{ end }}
deny all;
{{ end }}
from nginx-proxy.
I believe this can be closed since #106 was merged. See the README for instructions: https://github.com/jwilder/nginx-proxy/blob/master/README.md#custom-nginx-configuration
from nginx-proxy.
Hi, even if #106 lets us do the equivalent of this PR,
I think this PR is a better solution when you want to handle all the configuration from the proxyfied container with environment variables.
It's a little by annoying to put some configuration in the proxyfied container and update a file on the host.
particularly when you use nginx-proxy as the host nginx and want to just handle new containers without thinking about it
What do you think about keeping #106 to handle every cases, and use this PR as an additional method ?
from nginx-proxy.
👍
from nginx-proxy.
👍
from nginx-proxy.
@moul You guys might want to check out the discussion in #134. Two possible options discussed there are a JSON-formatted VIRTUAL_HOST_CONFIG
variable or a naming convention for variables starting with NGINX_PROXY_*
to expose any (or perhaps just most) Nginx settings.
from nginx-proxy.
Perhaps labels are an option too; e.g. org.jsonwilder.nginx-proxy.something=val
from nginx-proxy.
@thaJeztah Thanks for the reminder about labels. I haven't gotten around to playing with them yet, unfortunately.
Looks like label support was added to go-dockerclient
here: fsouza/go-dockerclient@bd32742
from nginx-proxy.
This is relevant too: nginx-proxy/docker-gen#81
from nginx-proxy.
Related Issues (20)
- Broken testcase test/test_host-network-mode/test_host-network-mode.py HOT 1
- SSH Certificates will Not Update HOT 1
- HTTP/2 Rapid Reset Attack HOT 2
- Unable to download python requirements for testing HOT 1
- default.conf config file formatting corrupted and hardly readable (nginx -T) HOT 1
- Issue with Bookstack urls being re-written to http not https HOT 2
- 403 Forbidden error when serving static site HOT 1
- Cannot reach container in IPv6 network HOT 4
- Regression in Behavior with Fix #2186 Affecting SSL Connections HOT 9
- "daemon" directive is duplicate in /etc/nginx/nginx.conf error HOT 3
- connect() failed (111: Connection refused) while connecting to upstream HOT 2
- vhost.d for http part
- 502 Bad Gateway & Upstream connection refused HOT 5
- host header does not include port number HOT 2
- `nginx-proxy` pass converting `%1C` to pipe `|` HOT 1
- 405 (cors error) on specific location
- The server connection via port 443 fails when using PHP 8.1 or above HOT 2
- Error 500 On Service Start
- htpasswd folder doesn't work anymore / no basic auth HOT 1
- Can't get .conf.template files to work with env variables/file. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx-proxy.