- Go to terminal and copy the default virtual host configuration to a new one (
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/mynewsite.conf
) - Edit this new file (
sudo gedit /etc/apache2/sites-available/mynewsite.conf
) and change the DocumentRoot to your own (save and close..) - Enable this new configuration file (
sudo a2ensite mynewsite.conf
) and dissable the default one (sudo a2dissite 000-default.conf
) - Edit the apache2.conf (
sudo gedit /etc/apache2/apache2.conf
) and change the default -section into this:<Directory [write_your_dir_here]> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>
(save and close..) - Restart Apache2 (
sudo service apache2 restart
)
If it already works: great!
Tidak ada komentar:
Posting Komentar