link
apache/create-vhost

Create Virtual Host

Create virtual host configuration

virtualhost
configuration

Command

sudo nano /etc/apache2/sites-available/example.com.conf

Examples

Create new vhost file

sudo nano /etc/apache2/sites-available/example.com.conf

Copy default template

sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf