Question

Ubuntu website folder

Posted May 24, 2014 2.3k 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?

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.

×
3 answers
Hello,

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.
by Etel Sverdlov
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.
Submit an Answer