I used two different tutorials to install nginx. LEMP and Redmine one
from Linode library.
I made the LEMP one work and after restarting nginx I used get message
with something about testing and that new config was or wasn’t loaded
successfully.
or else additionally specify the config file
location by using -c
/path/to/nginx.conf
gets
[email protected]:/opt/nginx# sbin/nginx -c conf/nginx.conf
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: still could not bind()
sorry, I got them wrong. The one you wanted is probaby -t.
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use)
[emerg]: still could not bind()
It seems to me that init script is exactly the same like was before.
any idea how I can get the old more detailed message after restarting
nginx?
nginx doesn’t print any “detailed messages” on reload. Actually,
reload is just sending HUP signal to nginx master process, so
nginx just has no chances to say anything as it’s not connected to
teminal. Anything it has to say (if something goes wrong) will be
written to error_log.
Probably your previous init script either used configtest (nginx
-t) before actual reload. Feel free to modify your new init
script to do the same.