$ sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mynewsite
-
Change the line
DocumentRoot /var/www/
toDocumentRoot /var/www/mynewsite
-
Create an alias in
/etc/apache2/sites-enabled
:
$ sudo a2ensite mynewsite
- Create the folder:
$ sudo mkdir /var/www/mynewsite
- Restart apache:
$ sudo service apache2 reload
- Go to browser and enter
localhost/mynewsite