Skip to main content

Posts

Showing posts with the label virtualhost

How to create virtual host on ubuntu apache2

How to create virtual host on ubuntu? create conf file under /etc/apache2/sites-available/ name it as vhosts.conf and put following contents <VirtualHost 127.0.0.3:80> ServerAdmin webmaster@test.dev ServerName test.dev ServerAlias www.test.dev DocumentRoot /var/www/html/projects/test ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> run following command to enable site sudo a2ensite vhosts.conf run following command to restart apache service sudo service apache2 restart run following command to enable rewrite mode sudo a2enmod rewrite and thats it