HTTP server setup

276 views
Skip to first unread message

owup

unread,
Oct 21, 2021, 3:11:42 PM10/21/21
to NetBox
Good afternoon,
Has anyone had luck setting up the HTTP server?


When I visit the URL, I am presented w/ the Apache2 Ubuntu Default Page. 
Also, it indicates the site is not secure. I used 

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout /etc/ssl/private/netbox.key \
-out /etc/ssl/certs/netbox.crt

to create a temporary self signed certificate.

I ran the following command (systemctl status apache2.service) to get the status of the apache server and got the following:
Oct 21 19:03:42 NETBOX.---.--- systemd[1]: Starting The Apache HTTP Server...
Oct 21 19:03:42  NETBOX.---.---   apachectl[18557]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Oct 21 19:03:42  NETBOX.---.---   apachectl[18557]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Oct 21 19:03:42  NETBOX.---.---  a apachectl[18557]: no listening sockets available, shutting down
Oct 21 19:03:42  NETBOX.---.---  apachectl[18557]: AH00015: Unable to open logs
Oct 21 19:03:42  NETBOX.---.---   apachectl[18554]: Action 'start' failed.
Oct 21 19:03:42  NETBOX.---.---   apachectl[18554]: The Apache error log may have more information.
Oct 21 19:03:42  NETBOX.---.---   systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Oct 21 19:03:42  NETBOX.---.---   systemd[1]: apache2.service: Failed with result 'exit-code'.
Oct 21 19:03:42  NETBOX.---.---   systemd[1]: Failed to start The Apache HTTP Server.

NETBOX.---.--- is my URL.

Can someone help?

Brian Candler

unread,
Oct 23, 2021, 6:28:51 AM10/23/21
to NetBox
On Thursday, 21 October 2021 at 20:11:42 UTC+1 owup wrote:
Has anyone had luck setting up the HTTP server?

Yes. Everybody else :-)
 

Oct 21 19:03:42  NETBOX.---.---   apachectl[18557]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Oct 21 19:03:42  NETBOX.---.---   apachectl[18557]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

This is telling you that you are trying to start apache, when you already have some daemon listening on port 80.  Try these commands as root:

lsof -i :80
ss -natp | grep :80
netstat -natp | grep :80
 
to get a clue as to what the other application is.
Reply all
Reply to author
Forward
0 new messages