"The requested URL was not found on this server." Even after setting up name servers and A record.

January 29, 2018 2.9k views
DNS Apache Ubuntu 16.04

Using Ubuntu 16.04 LAMP

keep getting this: The requested URL was not found on this server. After setting up name servers and A record.

I set up name servers on GoDaddy and the A record and nameserver on digital ocean but still am getting not found. I tested the connection from command line with host command for all three digital ocean servers and I get the correct IP address back. Also, tested this with host command with ISP and also received the correct IP address. I can also access the website from a browser with the IP but not domain name. Any help would be greatly appreciated!

2 Answers

"In case you are on Ubuntu, edit the file /etc/apache2/apache2.conf (here we have an example of /var/www):

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
and change it to;

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
then,

sudo service apache2 restart
You may need to also do sudo a2enmod rewrite to enable module rewrite."

This is a web server error. I would recommend starting by checking your web server's error logs in /var/log/apache2/error.log There should be additional details there that will assist us in tracking down the issue. It is likely that your web server is looking for your files in the wrong place when it receives a request.

Have another answer? Share your knowledge.