Now Playing Tracks

Create virtual host in Apache

First, create a virtual host record e.g create a file with the following linux command:

touch /etc/apache2/sites-available/

This fill create a empty file. Next, add the following record:

<VirtualHost *:80>

    DocumentRoot /home/www/



Enable the new apache virtual host with the following linux command:

# a2ensite

Restart apache:

/etc/init.d/apache2 restart

Apache http server


The Apache HTTP Server, commonly referred to as Apache, is a web server application notable for playing a key role in the initial growth of the World Wide Web. Originally based on the NCSA HTTPd server, development of Apache began in early 1995 after work on the NCSA code stalled. Apache quickly overtook NCSA HTTPd as the dominant HTTP server, and has remained the most popular HTTP server in use since April 1996. In 2009, it became the first web server software to serve more than 100 million websites.


To Tumblr, Love Pixel Union