Linux Mastering Development Ubuntu

Can’t connect to Apache webserver running on Ubuntu 20.04 headless server

I’m setting up NextCloud, but I’m having trouble connecting to my web server. Apache seems to be working until I try and connect to the IP in my browser which just times out or get 100% packet loss if I try to ping it.

● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2020-08-02 02:59:09 UTC; 8h ago
    Process: 124731 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 124754 (apache2)
      Tasks: 6 (limit: 4474)
     Memory: 15.2M
     CGroup: /system.slice/apache2.service
             ├─124754 /usr/sbin/apache2 -k start
             ├─124756 /usr/sbin/apache2 -k start
             ├─124757 /usr/sbin/apache2 -k start
             ├─124758 /usr/sbin/apache2 -k start
             ├─124759 /usr/sbin/apache2 -k start
             └─124760 /usr/sbin/apache2 -k start

Aug 02 02:59:09 verygoodserver systemd[1]: Starting The Apache HTTP Server...
Aug 02 02:59:09 verygoodserver systemd[1]: Started The Apache HTTP Server.

It’s definitely listening on port 80:

tcp6 0 0 :::80 :::* LISTEN 124754/apache2

… and I’ve added an ufw exception for ports 80 and 443, but that hasn’t made any difference either.

Thanks for your help.

Leave a Reply

Your email address will not be published. Required fields are marked *