Apache Lounge



Forum Index Downloads Search Register Log in  RSS Apache Lounge

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.

404 error on DocumentRoot doesn't return index.html

Post new topic   Reply to topic    Apache Forum Index -> Apache

View previous topic :: View next topic  
Author Message

Joined: 25 Jan 2018
Posts: 1

PostPosted: Fri 26 Jan '18 6:39    Post subject: 404 error on DocumentRoot doesn't return index.html Reply with quote


My issue is that I cannot access files (index.html) stored in /var/www via the browser that is on my server through the browser. So, when I do the following:
www.somename.com, I get a valid page, but when I do the following: www.somename.com/index.html, I get a 404 page.

My 000-default.conf file is the following:

NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin aaa@gmail.com
DocumentRoot /var/www
ServerName www.somename.com
ProxyRequests Off
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Proxy *>
Order deny,allow
Allow from all
ProxyPass /
ProxyPassReverse /


Please let me know if you need more information to help me resolve my issue. I have been stumped for several days now.

Back to top

Joined: 27 Jun 2016
Posts: 69
Location: Schömberg, Baden-Württemberg, Germany

PostPosted: Wed 31 Jan '18 0:48    Post subject: Reply with quote


I guess you already have checked that there is a /var/www/index.html when trying to access www.somename.com/index.html ? Smile

Question Who/what is creating/serving the data when you access www.somename.com ? Apache running on port 80 or is it only acting as a reverse proxy for some other webserver (tomcat?) running on the same box on port 8080?

Exclamation Have a look at the line
ProxyPass /

With this config you tell your apache to fetch every ressource (including the index.html) from the server running on port 8080.

So please ensure that either your port-8080-service has access to the index.html or forward only the needed ressources to the port-8080-service and let apache handle the rest (read the static files from the harddrive).

Additional: to clean up your config I would remove the "ProxyRequests"-line and the "<Proxy> ... </Proxy>"-stuff as it is needed for using apache as a forward proxy.
Back to top

Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1