Closed phaleth closed 1 month ago
@phaleth, thank you for your feedback. Good idea actually! I need to think about this :)
Okay. it will be added during next release. Please pay attention that configuration path has been changed too:
--conf-path=/etc/freenginx/freenginx.conf \
That was quick. Thank you, @ammnt
We have deployed one of our sites using the freenginx image and it works quite well.
Here's a little bit of a feedback. If I try to use port 8080
in a server section of my own included nginx.conf
It's not serving the site that I need, even tho I provide the config at the /etc/freenginx/conf.d/
dir. The reason is that this port is already taken by a server section in freenginx.conf
.
Would you consider moving away the server section from the default freenginx.conf
to /etc/freenginx/conf.d/default.conf
?
@phaleth, I think it doesn't make sense because you can just mount and use your own global conf file. But I want to change default internal port and use above 8080 next time. So it has been changed to 35400.
I guess it does make sense cause now there is a server running on port 35400 for no reason and so the freenginx engine needs to make it's workers aware of that unused server.
Please, take a look into what the official nginx image does by running one of those containers and checking the defaults by executing nginx -T
within the container.
Also I'd rather keep the defaults from your global freenginx.conf and adjust only what's really necessary in custom nginx.conf.
I understand what you want to do, but what if you have more than one sites? In cases like these better change listen port in /etc/freenginx/conf.d/
conf files and keep global conf file I think.
Great. In cases you have more than one site you definitely might want to create a new file in the /etc/freenginx/conf.d/
dir for each of those sites, while always inheriting defaults from your freenginx.conf
.
@phaleth, okay. I need to think about this.
It's done now.
Again, that was super quick. Thank you. @ammnt
Any chance to provide the default
nginx.conf
such as the following one, but maybe without logs enabled by default?Also while leaving out the current server section and including the include line at the bottom so that the user of the image can copy in their own config or maybe override the
/etc/nginx/conf.d/default.conf
if it's present, as shown bellow.Very nice and compact image, btw.
Example usage would then be: