I am not able to launch my site. (I cloned the code using git into the droplet!) Please help me out.

August 5, 2016 637 views
Apache Git LAMP Stack

I followed this link perfectly : https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04

I also installed apache, mysql and git properly.

and they do show up as I enter my IP address.

But when I enter : IPaddress/projectname (it gives a 404 - Not Found error stating "requested URL was not found on this server").

Please help.

1 comment
1 Answer

You provide very little information to go on. A 404 error indicates that the requested file was not found so my first guess would be that you cloned your git repository to the wrong location. The default apache web root is /var/www/html/ so if you wanted your content to be available at example.org/mycontent it would need to be placed in /var/www/html/mycontent on your droplet.

Another possible issue is if your permissions are not set properly. If you ran your git clone as the user root then your files would be owned by root and may not be readable by the web server (apache runs as the user "www-data"). You can use the following command to set the ownership of everything in your web root recursively.

chown -Rf www-data:www-data /var/www/html
Have another answer? Share your knowledge.