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/example.com

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

<VirtualHost *:80>

    DocumentRoot /home/www/example.com

    ServerName example.com

</VirtualHost>

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

# a2ensite example.com

Restart apache:

/etc/init.d/apache2 restart

Apache http server

image

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.

More: http://en.wikipedia.org/wiki/Apache_HTTP_Server

To Tumblr, Love Pixel Union