I am working Linux Mint 17.3, and trying to create virtual hosts on Apache 2.4. I have followed the following procedure, but I still can't browse the site.
Create two new virtual hosts.
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/site1.com.conf
Modify each host.
sudo vim /etc/apache2/sites-available/site1.com.conf <VirtualHost *:80> ServerName site1.com ServerAlias www.site1.com ServerAdmin admin@site1.com DocumentRoot /var/www/site1.com/public_html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Enable the new virtual host files.
sudo a2ensite site1.com // Disable original html host sudo a2dissite 000-default.conf sudo service apache2 reload
Add host info.
sudo vim /etc/hosts 127.0.0.1:88 site1.com 127.0.0.1:89 site2.com
I have checked out everything online that I could. I want to know what step I am missing here.