I'm running apache on a raspberry pi behind my firewall and trying to serve a static index.html
from it. I have a domain example.com
registered and pointed at my public IP by a DNS service, and my router is forwarding port 80 requests to the raspberry pi
When I try to reach example.com, my public IP/index.html, or the pi's private IP/index.html chrome produces This site can't be reached
. The fact that the error is the same regardless of trying to contact via IP or domain name tells me the problem is not with the DNS service.
Presumably then the problem is with Apache.
1) The apache2 service is running, though I'm not sure why there are so many processes for it:
ps aux | grep apache2
root 10857 3.3 2.0 95976 19668 ? Ss 22:21 0:00 /usr/sbin/apache2 -k start
www-data 10860 0.0 0.6 96000 5768 ? S 22:21 0:00 /usr/sbin/apache2 -k start
www-data 10861 0.0 0.6 96000 5768 ? S 22:21 0:00 /usr/sbin/apache2 -k start
www-data 10862 0.0 0.6 96000 5768 ? S 22:21 0:00 /usr/sbin/apache2 -k start
www-data 10863 0.0 0.6 96000 5768 ? S 22:21 0:00 /usr/sbin/apache2 -k start
www-data 10864 0.0 0.6 96000 5768 ? S 22:21 0:00 /usr/sbin/apache2 -k start
server 10874 0.0 0.2 4156 1976 pts/0 S+ 22:21 0:00 grep --color=auto apache2
2) The apache config file defines the root directory as /var/www/html
which is where index.html
is located.
3) netstat -tulpn | grep apache2
:
tcp6 0 0 :::80 :::* LISTEN 10857/apache2
Any ideas?