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
Docs: https://httpd.apache.org/docs/2.4/
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.
In file
/etc/apache2/ports.conf
changeto
You may get more information about this on unix.stackechange.com.
Note: ISPs typically give dynamic IP address. These IPs change with time and live within multiple layers of switches and hubs. Thus not accessible from other computers. You may need to ask for static IP from your ISP.
Without static IP, you can access this computer from your home/office network only. To access within such network, you can get the IP using
ip -4 addr
Moreover, as given by Pavel Šimerda in the unix.stackexchange.com link,