Question

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

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: my_url/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!

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

sudo a2enmod rewrite && sudo service apache2 restart

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