Create a file under /etc/apache2/sites-available for each website you want. You could name the files by the domain, such as web1.example.com.
Add the following to the file, with the information changed for your website:
Code:
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin webmaster@example.com
ServerName www.example.com
ServerAlias example.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /home/example_user/public/example.com/public
# Log file locations
LogLevel warn
ErrorLog /home/example_user/public/example.com/log/error.log
CustomLog /home/example_user/public/example.com/log/access.log combined
</VirtualHost>
Then run
Code:
sudo a2ensite web1.example.com
and then
Code:
sudo service apache2 restart
Repeat this process for each web server directory and website you want to create.