TrafeX / docker-php-nginx

Docker image with PHP-FPM 8.3 & Nginx 1.26 on Alpine Linux
https://hub.docker.com/r/trafex/php-nginx
MIT License
1.37k stars 736 forks source link

about server.conf and nginx.conf #98

Closed youyifentian closed 1 year ago

youyifentian commented 2 years ago

i can mount a configuration file for nginx but i must enter the container edit the nginx.conf file However, it doesn't make me feel comfortable because,if i want to use the default port 8080 settings,I have to get into the container,edit or delete some code of nginx.conf file,so that would make it look useless for mount a configuration file

so why not move some code of nginx.conf to /etc/nginx/conf.d/server.conf or /etc/nginx/conf.d/default.conf for default config some code like: server { listen [::]:8080 default_server; listen 8080 default_server; servername ; ..............

so We can edit server.conf or default.conf without entering the container

TrafeX commented 1 year ago

Hi @youyifentian,

Thank you. I'll consider changing this since more people are asking the same question.

yani commented 1 year ago

Hi. It would be nice to separate http{} and server{} in the nginx config so when we set a custom server{} the default one is not used.

TrafeX commented 1 year ago

Hi @youyifentian and @yani ,

It it took a while, but the nginx config is now split up thanks to https://github.com/TrafeX/docker-php-nginx/pull/109