Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx on host is a must? #529

Closed
dirad opened this issue Aug 11, 2016 · 6 comments
Closed

nginx on host is a must? #529

dirad opened this issue Aug 11, 2016 · 6 comments

Comments

@dirad
Copy link

dirad commented Aug 11, 2016

I am trying to setup a server with official nginx + reverse-proxy + multiple hosts with ssl.

My host does not have nginx installed, and only the images/containers do.
Right now all i get is a 503 from nginx, what do i do with the nginx.tmpl file if i have no /etc/nginx || /usr/share/nginx || any nginx directories ?

@wader
Copy link

wader commented Aug 11, 2016

You don't need nginx on the host, you only need docker. The nginx-proxy runs it's own nginx instance inside the container. nginx.tmpl is the default config template included in the image, you don't need to provide your own on the host.

the nginx-proxy container proxies requests to other containers over the docker network.

@dirad
Copy link
Author

dirad commented Aug 22, 2016

thanks for the replay @wader

In the README, where it states files like /etc/nginx/vhost.d for example, where is this referring to? should i create the files on the host system, even without installing nginx?

@wader
Copy link

wader commented Aug 22, 2016

I think that refers to /etc/nginx/vhost.d in the nginx-proxy container. But you can create a volume on the host mapping some host directory to it.

@dirad
Copy link
Author

dirad commented Aug 22, 2016

Doesnt the container have its data purged everytime it comes up?

On Mon, Aug 22, 2016 at 3:00 PM, Mattias Wadman notifications@github.com
wrote:

I think that refers to '/etc/nginx/vhost.d' in the nginx-proxy container.
But you can create a volume on the host mapping some host directory to it.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#529 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALeTg2otO8V-eyuZBQCMW4puvFgAKZmuks5qiY9ygaJpZM4Jh866
.

@wader
Copy link

wader commented Aug 22, 2016

Nope, unless the container start script does it somehow. Host volumes (-v /host/path:/container/path) are just bind mounts into the container, data volumes (-v /container/path) has at least the same life time as the container. docker-compose has some magic to move data volumes between container recreates.

@luckydonald
Copy link

data volumes always need to be deleted manually as far as I know

@tkw1536 tkw1536 closed this as completed Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants