how to redirect on Ubuntu/Apache from to

February 13, 2014 1.8k views
After following the steps from these 2 articles: 1. 2. I'm able to type in my domain name and get some where, except I get to the default apache view of what's inside a directory. The one item in there is a directory named public_html. Because of the articles, I put my files into the public_html directory. How do make my droplet serve the files in public_html when someone goes to my domain name? I figure it has to do with: -htaccess? -httpdconf? -symlink? -virtual host? I would love to be able to make sense of this stuff. thanks!
4 Answers
Change the webroot so it's /var/webdir/public_html instead (change this, it depends on how you set it up.)
What is the full path to your files? Can you also pastebin your virtualhost configs?
@Kamal, the full path to my files is $ /var/www/
You will need to edit your virtualhost config and set DocumentRoot to /var/www/ and restart Apache afterwards.
Have another answer? Share your knowledge.