0

I have a fresh install of Ubuntu Server 22.04, on which I installed apache2 via apt-get install After the installation I got the following error whenever I tried to start Apache2:

(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80

After some investigation, I found that httpd was already bound to port 80 and preventing Apache2 starting. I hadn't realised that this version of Ubuntu Server came pre-installed with Nextcloud (via snap) which obviously already had a webserver to run!

Killing the process doesn't seem to work, as it just springs back up again before I can restart apache2.

There is no /etc/httpd directory and the /etc/apache2/ path relates to my installation that can't start, so how do I find the config files of the mysterious apache server that is already running?

I would eventually want to have Nextcloud running on this system but my primary goal is to have a running webserver to serve pages locally on the network.

Thanks in advance

James

  • Try : ps -eaf | grep http This may give you the path of the installed apache server. You can also try : lsof | grep 80 – Ptit Xav Aug 15 '23 at 16:02
  • Thanks Ptit, this confirmed that the httpd instance was inside the Nextcloud snap container – Bushkin Aug 16 '23 at 06:21

1 Answers1

0

I hadn't realised that this version of Ubuntu Server came pre-installed with Nextcloud

So presumably you would be happy to get rid of it.

Check the spelling (and capitalization) of the package name using snap list, then remove the package with snap remove nextcloud (or whatever name its using).

symcbean
  • 21,009
  • 1
  • 31
  • 52
  • Great, thanks - that lets Apache2 start and bind successfully. I have not used snap / containerised systems before - it seems strange to me that nextcloud includes it's own apache instance that conflicts with a traditional instance of apache as in this case?! – Bushkin Aug 16 '23 at 06:20