Ubuntu website folder

May 24, 2014 1.8k views
I have used this tutorial to install everything: https://www.digitalocean.com/community/articles/how-to-launch-your-site-on-a-new-ubuntu-12-04-server-with-lamp-sftp-and-dns But now I want to test and set up a website. I use sftp to connect. I go to this folder: /var/www/ Then there is a folder html where the "index.html" file is with the ubuntu info. How can I change the html folder to an different name?
3 Answers

If you follow the instructions under apache2 in the LAMP section of the guide above: https://www.digitalocean.com/community/articles/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu

You will reach a point where it shows the directory that apache2 will look for the website content. You can change this to a different path or whatever folder you would like. Restart apache and the server should point to the new location.
This tutorial explains how to install Apache, how to install MySQL, how to change the root MySQL password, how to install PHP, and how to see what libraries are available. LAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache ( the web server) , MySQL (the database), and PHP (the language). This tutorial is written for Ubuntu.
Oke and how can I do that? It's all new for me.
Edit the virtualhost file in /etc/apache2/sites-enabled and set DocumentRoot to whatever path you like.
Have another answer? Share your knowledge.