1

I have my Apache server all setup with a domain pointing to its IP address. When I go to the domain it serves me the "It Works!" page. I have another page in the /var/www/html directory called page.html. However, when I type in www.mydomain.com/page.html is gives me a 404 Not Found error. And when I type www.mydomain.com/index.html, it brings me right to the index page which is the "it works!" one. I have no idea whats going on and I've been scouring the internet in search of an answer and I have come back empty-handed. My domain provider is Ipage if that is any help.

404 Not Found Page screenshot

2
  • Comments are not for extended discussion; the contents of the conversation taking place here have been moved to chat.
    – Thomas Ward
    Nov 30, 2016 at 23:16
  • Is the index.html page present in the same directory as your page.html? Could you check they both have correct permissions (ls -l)?
    – Melebius
    Apr 19, 2018 at 7:54

1 Answer 1

0

Try enabling mod_rewrite with sudo a2enmod rewrite.

You can also try checking any config files in /etc/apache2/sites-enabled and ensuring that AllowOverride is set to All and not none.

After either or both is done, restart Apache with sudo service apache2 restart.

2
  • Can you explain how this could help, especially without any rewrite rules?
    – Melebius
    Apr 19, 2018 at 7:55
  • @Melebius without mod_rewrite or allowing overrides your server may not be able to correctly serve files due to (most likely) not recognizing the connection between domain name and folder location.
    – zbee
    Apr 26, 2018 at 21:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .