1) Edit /etc/hosts , add new servernames like
10.10.10.20 site1.in.ua
10.10.10.20 site2.in.ua
2) Make config file for every site in
/etc/apache2/sites-available/site1.in.ua.conf
/etc/apache2/sites-available/site2.in.ua.conf
example:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/site1.in.ua
ServerName site1.in.ua
ServerAlias www.site1.in.ua
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
3) For enable virtual hosts run :
sudo a2ensite site1.in.ua.conf
sudo a2ensite site2.in.ua.conf
4) restart apache2
/etc/init.d/apache2 restart
10.10.10.20 site1.in.ua
10.10.10.20 site2.in.ua
2) Make config file for every site in
/etc/apache2/sites-available/site1.in.ua.conf
/etc/apache2/sites-available/site2.in.ua.conf
example:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/site1.in.ua
ServerName site1.in.ua
ServerAlias www.site1.in.ua
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
3) For enable virtual hosts run :
sudo a2ensite site1.in.ua.conf
sudo a2ensite site2.in.ua.conf
4) restart apache2
/etc/init.d/apache2 restart