Where is the nginx conf location after installation?


Hello guys,

I just now finished the installation and want to make some changes in nginx configuration. I followed the tutorial of the installation under 30 mins, which is using the Docker to get started. So when I sshed the server, using the command: cd /etc/nginx, I found that there is no such directory.

I am using Ubuntu 16.04 LTS. Please help tell me the nginx conf file location with Docker installation.


(Matt Palmer) #2

It’s in /etc/nginx/nginx.conf (and files referenced therefrom) inside the container. However, you should not edit it directly, because those changes will be overwritten on the next container rebuild. Instead, you should modify the app.yml to make edits to the configuration at build time, so that your changes will be preserved on each container rebuild.


Hi Matt,

Thanks for your reply. Thanks for your advice. I’ll just deal with the app.yml file. But there is no such a /etc/nginx/nginx.conf directory.


Also, for every modifications on app.yml, should I run rebuild command afterwards?

(Jay Pfaffman) #5

It’s inside the container, not the machine where you installed it. To get inside the container you type

cd /var/discourse
./launcher enter app

but since you don’t understand what’s inside the container, it may be that the changes you make to nginx won’t do what you think.

Yes, any time you change app.yml you must:

cd /var/discourse
./launcher rebuild app


Hi Jay, thank you so much for your reply. You made my day.