Docker-Webstack
Docker-Webstack copied to clipboard
Fix nginx config by removing http.d config
It seems like nginx now stores the config of the default.conf site in http.d instead of conf.d . Which causes nginx to shutdown with the following error
2022/07/24 18:48:00 [emerg] 920#920: a duplicate default server for 0.0.0.0:80 in /etc/nginx/http.d/default.conf:5
I observed this on the 8.1 docker image, But for good measure I added the same statements to all versions: Delete all the things.
@blackshadev nice find!
I cannot reproduce Nginx shutting down locally, since a custom nginx.conf is put into place that completely ignores the /etc/nginx/http.d directory and instead loads from the conf.d directory: https://github.com/eXistenZNL/Docker-Webstack/blob/master/files/general/etc/nginx/nginx.conf#L65
Did you find this issue after you added your own custom nginx.conf? I believe that now the /etc/nginx/http.d survives the cleaning command, it can have some side effects once you override nginx.conf with a version that wants to load from the http.d folder.
Anyhow, now that /etc/nginx/conf.d no longer exists, would you mind removing that from the rm -rf command? Also the nginx.conf file in this repo should probably be updated to load from /etc/nginx/http.d instead of /etc/nginx/conf.d (Line 65) since that folder does not exist in the first place, wouldn't you agree?
Sure, done
@blackshadev would you mind updating the nginx.conf as well? :+1:
Also the nginx.conf file in this repo should probably be updated to load from /etc/nginx/http.d instead of /etc/nginx/conf.d (Line 65) since that folder does not exist in the first place, wouldn't you agree?
Done.
Due to the seer amount of text in your first comment I was unable to process the whole request at once and stopped at the first incling of my braining going "I think he means this"
HTTP/1.1 413 Request Entity Too Large :D
Merged, thanks for the contribution!