madjura
By:
madjura

Requested URL not found (index.html works fine) - Works with IP instead of URL

April 23, 2016 676 views
Apache DNS Ubuntu

Hello,
I have been following the tutorials:
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-host-name-with-digitalocean
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04
When I attempt http://your_server_IP_address/info.php: I find info.php and it shows the site shown in the picture.
However when I do: myurl/info.php it does not show, I get "The requested URL /info.php was not found on this server."
Going to just my
url I am shown the index.html page, which I can edit and it shows the edits, so that works.
Both index.html and info.php are in the var/www folder (both in the same folder).
One thing I have done differently is enable domain redirect on the site where I bought the domain, I chose "Frame redirect" and the IP I get from here, the domain servers ns1.digitalocean.com... are registered on their site as well. If I do not enable this domain redirect option browsing to my url just tells me that redirect is disabled and shows nothing. Is that normal? The tutorial mentions it can take a while for the redirect to work, without the domain redirect though the whois shows the correct inforamtion as shown in the tutorial.
I am using Ubuntu 14.04.

Thank you for reading!

1 comment
  • The problem resolved itself, somehow. Maybe I was doing something wrong (it was late) but it works now.

2 Answers

Quoting the question asker- "The problem resolved itself, somehow. Maybe I was doing something wrong (it was late) but it works now."

sudo a2enmod rewrite && sudo service apache2 restart

Have another answer? Share your knowledge.