The error message rather indicates the server being unable to reach. Are you sure you configured it to listen on port 8080? Check the following things:
- check your
/etc/apache2/ports.conf
what ports you have configured Apache to listen on. It's shown in the line starting with "Listen", and by default points to port 80
- run
netstat -a -t -n
to check for listening services. The column "State" should show "LISTEN" here, and the column "Local Address" has your local services. In this column, the port in use is printed after a colon, so e.g. "*:8080" would indicate there is something listening on port 8080
- check your Apache error log file for details. If not configured otherwise, you should find it in
/var/log/apache2/error.log
The most likely cause is you set up Apache to listen on port 80 (which is the default), and now try to follow some tutorial which assumes otherwise. It might also involve configuring a virtual host, and you skipped this step (or didn't succeed here).
If, on the other hand, your configuration is to have Apache listen on port 8080, and it is listed by above netstat
command properly, it could be some permission problem -- though that normally should be indicated by a different error. Just to make sure you can rule this out:
- check what user Apache is running under. This usually is
www-data:www-data
(i.e. user and group is www-data
). Using the command ps -aeo "%p %U %G %x %c" |grep apache
you should see all Apache processes, having the user and group in the second and third column.
- check directory and file permissions. Either user or group should have at least read and execute on the directories, and read on the files. Having your
DOCUMENT_ROOT
in /var/www
, for example, and accessing an index.html
there, the file must be at least readable to Apache's user or group, and /var
as well as /var/www
should have read and execute permissions given.