Hi! I installed Discourse Docker, I need to make changes in the Nginx config, but I can’t found file configuration. In the directory /etc/ folder nginx at all ![]()
/var/www, /var/nginx/conf, /etc/nginx - folders doesn’t exist.
The discussion revolves around modifying the Nginx configuration in Discourse Docker. Sergio777 is unable to find the Nginx configuration files and seeks assistance. itsbhanusharma suggests using an external Nginx as a reverse proxy or creating a hook in the yml file to make changes. pfaffman questions the necessity of modifying the Nginx config and points to the templates directory in /var/discourse for modifying Nginx files.
It is later revealed that Sergio777 might be trying to add Content Security Policy (CSP), for which itsbhanusharma notes that Discourse supports adding CSP through settings, making Nginx modifications unnecessary.
Hi! I installed Discourse Docker, I need to make changes in the Nginx config, but I can’t found file configuration. In the directory /etc/ folder nginx at all ![]()
/var/www, /var/nginx/conf, /etc/nginx - folders doesn’t exist.
Depending upon what you’d want to change in the nginx configuration, the easiest way would be to use an external nginx as reverse proxy to the discourse container and make your changes there.
Alternatively, if you want to make changes directly to your internal nginx server, you may have to create a hook in your yml file. It will vary based on what you want to achieve but this topic will give you a hint Setup Multisite Configuration with Let's Encrypt and no Reverse Proxy
Why?
What are you trying to do? This probably isn’t the way to do it.
But you can look at templates directory in /var/discourse for example of how to modify nginx files when the container is built.
Adding CSP is supported in discourse through settings so you don’t need to do anything with nginx. See: