- Create a virtual host file at
/etc/apache2/sites-available/yoursite.conf
, e.g.
<VirtualHost *:80>
ServerName yoursite.com
DocumentRoot /somewhere/public
<Directory /somewhere/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
Require all granted
</Directory>
</VirtualHost>
- Enable it
sudo a2ensite yoursite.conf
- Activate it
sudo service apache2 reload