Is there a conflict between Debian Bullseye and nginx?

Mike Lieberman mike at netwright.net
Fri Dec 16 08:27:15 UTC 2022


I am running Debian Bullseye: this is a stripped down Command Line only install without a GUI. It runs apache2 and ISC-BIND only in a VirtualBox VM.

# uname -r
5.10.0-19-amd64
# nginx -v
nginx version: nginx/1.23.2
# apache2 -v
Server version: Apache/2.4.54 (Debian)
Server built:   2022-06-08T16:00:36

This is NOT commented out:
pid /run/nginx.pid; 

apache2 - runs with no problems. syslog is clear of any error message from anything. 

I was looking to use LetsEncrypt which uses nginx.

** While apache2 is running, if I try to start nginx I get this. **

 nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2022-12-16 15:54:02 PST; 58s ago
       Docs: man:nginx(8)
    Process: 38159 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 38160 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; ([b]code=exited, status=1/FAILURE[/b])
        CPU: 51ms

Dec 16 15:54:00 www nginx[38160]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Dec 16 15:54:00 www nginx[38160]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Dec 16 15:54:01 www nginx[38160]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Dec 16 15:54:01 www nginx[38160]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Dec 16 15:54:01 www nginx[38160]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Dec 16 15:54:01 www nginx[38160]: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Dec 16 15:54:02 www nginx[38160]: nginx: [emerg] still could not bind()
Dec 16 15:54:02 www systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Dec 16 15:54:02 www systemd[1]: nginx.service: Failed with result 'exit-code'.
Dec 16 15:54:02 www systemd[1]: Failed to start A high performance web server and a reverse proxy server.

If I stop apache2 then nginx loads **BUT** then apache2 refused to load with this statement:

Starting apache2 (via systemctl): apache2.serviceJob for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
 failed!
root at www:/home/mike# systemctl status apache2.service
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2022-12-16 15:57:04 PST; 17s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 38198 ExecStart=/usr/sbin/apachectl start ([b]code=exited, status=1/FAILURE[/b])
        CPU: 32ms

Dec 16 15:57:04 www systemd[1]: Starting The Apache HTTP Server...
Dec 16 15:57:04 www apachectl[38201]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Dec 16 15:57:04 www apachectl[38201]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Dec 16 15:57:04 www apachectl[38201]: no listening sockets available, shutting down
Dec 16 15:57:04 www apachectl[38201]: AH00015: Unable to open logs
Dec 16 15:57:04 www apachectl[38198]: Action 'start' failed.
Dec 16 15:57:04 www apachectl[38198]: The Apache error log may have more information.
Dec 16 15:57:04 www systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Dec 16 15:57:04 www systemd[1]: apache2.service: Failed with result 'exit-code'.
Dec 16 15:57:04 www systemd[1]: Failed to start The Apache HTTP Server.


More information about the nginx mailing list