XK0-004 · Question #516
A Linux administrator is installing an NGINX-based proxy service on the same server that hosts the Apache-based HTTP services When the administrator launches the proxy service, the following error…
The correct answer is B. An application is using port 80. The error 'Address already in use' on port 80 indicates that another process, in this case Apache/httpd, has already bound to that port before NGINX attempts to start.
Question
A Linux administrator is installing an NGINX-based proxy service on the same server that hosts the Apache-based HTTP services When the administrator launches the proxy service, the following error message is received:
Address already in use: make_sock: could not bind to address 0.0.0.0:80 The administrator runs the following commands to troubleshoot the issue and receives the following relevant output:
Which of the following is the MOST likely issue?
Exhibit
Options
- AA FORWARD chain rule in iptables is missing
- BAn application is using port 80
- CApache is only listening on localhost:80
- DThe httpd is missing the proxy module
How the community answered
(28 responses)- A4% (1)
- B82% (23)
- C11% (3)
- D4% (1)
Why each option
The error 'Address already in use' on port 80 indicates that another process, in this case Apache/httpd, has already bound to that port before NGINX attempts to start.
A missing FORWARD chain rule in iptables governs packet routing between interfaces and has no effect on whether a local process can bind to a socket address.
The error message 'make_sock: could not bind to address 0.0.0.0:80' is the operating system's explicit signal that a socket on port 80 is already claimed by a running process. Since Apache is already running on the same server and defaults to port 80, NGINX cannot also bind to that same address and port. Resolving this requires either stopping Apache, moving one service to a different port, or configuring a shared socket approach.
If Apache were only listening on localhost:80, it would still hold that port on the loopback interface, and the actual error references 0.0.0.0:80, meaning NGINX is trying to bind all interfaces - the root cause is still port 80 being occupied.
A missing proxy module in httpd would produce a configuration or module-loading error, not a socket binding failure, so it cannot cause this specific error message.
Concept tested: Port conflict diagnosis on Linux services
Source: https://nginx.org/en/docs/beginners_guide.html
Topics
Community Discussion
No community discussion yet for this question.
