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

/etc/nginx/conf.d/, not /etc/nginx/sites-enabled/ #12

Open
karabijavad opened this issue Dec 4, 2014 · 12 comments
Open

/etc/nginx/conf.d/, not /etc/nginx/sites-enabled/ #12

karabijavad opened this issue Dec 4, 2014 · 12 comments

Comments

@karabijavad
Copy link

currently, the nginx.conf file includes this:

include /etc/nginx/conf.d/*.conf;
@adam-beck
Copy link

It also includes:

include /etc/nginx/sites-enabled/*;

You can make sure of this by running
docker cp <CONTAINER_ID>:/etc/nginx/nginx.conf ./nginx.conf

or

docker cp <CONTAINER_NAME>:/etc/nginx/nginx.conf ./nginx.conf

Then review the resulting file.

@nick-allen
Copy link

Not seeing any reference to sites-enabled in the nginx.conf in the latest image. Only include directives are for mime.types and conf.d/*.conf.

@metal3d
Copy link

metal3d commented Feb 17, 2015

I agree @nick-allen
sites-enabled is not included in configuration.

Note that "site-enabled" is a "debian model" (not a bad ideao BTW) that is not the common method. Centos, RedHat and so on doesn't use that method.

nginx image should change configuration to include site-enabled.

UPDATE: the build process could add "conf.d/sites-enabled.conf" files that include "sites-enabled" too...

@metal3d
Copy link

metal3d commented Feb 17, 2015

I come back to confirm @nick-allen
default.conf that is in conf.d serve "/" location. That disable our configuation even if I link my file in conf.d
The better way is to change volume mapping to not use /etc/nginx/sites-enabled but /etc/nginx/conf.d - so only change documentation.

@nick-allen
Copy link

Yea, that works perfectly fine.

pilerou added a commit to pilerou/nginx that referenced this issue Apr 16, 2015
/etc/nginx/conf.d have to be used instead /etc/nginx/sites-enabled
@pilerou
Copy link
Contributor

pilerou commented Apr 16, 2015

I lost 2 hours on it. I just added a pull request #18 to modify documentation.

pilwon added a commit that referenced this issue Apr 17, 2015
#12 nginx sites-enabled is not used
@metal3d
Copy link

metal3d commented Apr 23, 2015

👍 @pilerou

@sharpner
Copy link

thanks for this ticket....

@atavakoli
Copy link

It looks like #18 was merged. Should this issue be closed now?

@christopher-francisco
Copy link

Any chance we can put this in the Docker Hub documentation?

@JamesTheHacker
Copy link

JamesTheHacker commented Jan 13, 2019

So does this mean I have to create an /etc/nginx/nginx.conf (including all the nginx configuration) from scratch instead of just a sites-enabled/my-site.com.conf ? Little confused as I've had this problem today and it's taken me hours to get to this.

@metal3d
Copy link

metal3d commented Jan 24, 2019

@JamesTheHacker You only need to put your configuration un "/etc/nginx/conf.d" directory inside the container (via volume, or via ADD in Dockerfile).
The default /etc/nginx/nginx.conf that is in the container will include them all.

collinbarrett added a commit to collinbarrett/wp-host-on-containers that referenced this issue Mar 9, 2019
tobyvhenderson added a commit to tobyvhenderson/wp-host-on-containers that referenced this issue Mar 18, 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

9 participants