public_html question

Posted April 18, 2014 8.1k views
Where is the public_html folder where I can put the site files? I have just created a droplet. Can anyone guide me on this one? Thank you.

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.

Submit an Answer
9 answers
Well I know for apache, on ubuntu, its in the /var/www/ folder.
I'm assuming you are using Centos since you are asking about public_html.

have you install vsftpd?
I currently have the access through SFTP, I just need to know where should I place my files in order to run it. Thank you.
still assuming you have centos... the folder is called HOME and is located in the root of the server, you normally log in and end up in your user profile path, something like ~
Type cd /
the do a ls -l to show the folder

you can create inside HOME a folder for each site and use apache config to point to the folder(s) based on the domain
Thank you. Just one more thing, Could you guide me on the apache configuration and pointing the domain to the folder? I am not really familiar with it yet. Thank you.
@azani Have you already installed Apache? Check out this tutorial:

It should get you headed in the right direction.
by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one domain off of a single IP address and allows you to run multiple sites off of a single DigitalOcean droplet. This tutorial describes how to set up virtual hosts with Apache on Centos
@andrew Thank you. I'm gonna try to follow the steps written there.
@andrew Hello andrew, I have just followed the instructions but when starting the httpd, it has failed, any idea why? Thanks by the way.
Failures to start are usually the result of some kind of misconfiguration. Check any changes you have made to the config file and ensure that they are correct. Check the apache error log to figure out what the problem is if you don't see any obvious problems in the config file. There should be an error message pointing you to the source of the problem.