GunnaSatria

December 13, 2007

Create Virtual Host Name using Apache

Filed under: Uncategorized — gunnasatria @ 1:07 pm

Suppose you have a web application running on Apache and you want to change the url address of your application to be more friendly like www.gunnasatria.com
All you have to do is to create a virtual host name.


Edit your httpd.conf file, usually it’s located in conf folder and add the lines

NameVirtualHost [your server ip]:[active port]
<VirtualHost [your server ip]:[active port]>
ServerName www.gunnasatria.com
DocumentRoot [folder point to your web app] 
</VirtualHost>

Then restart your apache service.
But this is not the only step, you must add the new url to your DNS to point to your server IP. So every request for the new url points to your server IP.

Good Luck

2 Comments »

  1. wah wah..ternyata dirimu punya blog jg hehehe, asik, banyak tutorialnya nih.. :D

    Comment by ojat — December 13, 2007 @ 2:03 pm

  2. Hebat….rajin menulis di blok. Semoga jerih payahmu mendapatkan imbalan yang pantas, surga disediakan bagi ummatnya yang ikhlas. amin.

    Comment by Pak Soen — December 13, 2007 @ 11:31 pm


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.