inside the web template file, I found the instructions where it update the nginx config file template (replace statements) ..
Isn’t there away to add a whole new section to nginx config ???
/uploads folder in discourse/shared is accessible from nginx .. I want to add a new folder /photos ..
is there a direct way (discourse recommended way)
Maybe I have mentioned ther wrong example .. what I’m trying to figure out is .. how can I reach the origianl nginx config and add a whoe section inside whether adding a new mapping for a folder or anything else .. is that doable ? or it’s just not recommended ?
I can install an external nginx server and make it redirect all links to the docker nginx and do my stuff ..
We also need to remove the additional rewrite that web.ssl.template.yml adds since it forces only the DISCOURSE_HOSTNAME and now we have others!
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"
from: /gzip on;[^\}]+\}/m
to: |
gzip on;
add_header Strict-Transport-Security 'max-age=31536000'; # remember the certificate for a year and automatically connect to HTTPS for this domain
Why not tell us why you need this extra folder? It’s possible that someone else has had a similar need, but that the assumed solution isn’t the only way to achieve it.
I said it was a bad example .. I can manage any extra folder with different solutions .. no issues so far ..
Yet, I want to be able to add a whole new section in the nginx config .. I’m just curios how to do it if I had to do it ..
Any chance you could pattern match as I proposed, the match being the pattern at the end of the file, then replace the pattern with the same but with your changes added onto the end?
I thought so ..
I was wondering maybe there is a mahic field for newly appended section .. defined for this purpose ..
never mind .. I think I can manage based on your suggestion