Jumat, 11 Juni 2010

Setting Virtual host for XAMPP

In the afternoon I will be comfortable enough to discuss a bit about virtual hosts and how to set vhost (virtual host) in the XAMPP web server. okay .. before we do the setting vhostnya we should first know the concept and understanding of the virtual host .. is a trivial virtual host is to make a few servers in a server .. which of course with a domain that berbeda2 .. eg-teladan.com www.sma .. or www.tokoku.com and so forth .. This vhost very helpful in the management of the local server, because we can freely create at will our domain but not with the same record with a domain that is already on the internet if the server is connected to the internet ..

we just discussed how virtual settings .. hostnya Here the web server I use is XAMPP .. many types of web servers available, please you use your liking ... there are some simple steps you need to do ..

The first step is that we first define the server name (domain) that we will use. files we have to change are in C: \ windows \ system32 \ drivers \ etc> hosts the following code should be changed / added

# For example:

#

# # Source server 102.54.94.97 rhino.acme.com

# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

127.0.0.1 sma1jogja.com

192.168.10.1 www.webku.com

the top of this you can add the domain name you'll use, also include IPnya address .. if you use a static IP, then it can be written as well.

The next step you need to modify the httpd.conf file located in C: \ xampp \ apache \ conf open the above files using Notepad or WordPad .. then locate the directory and change its configuration to be as follows:



Options Indexes FollowSymLinks Includes ExecCGI

AllowOverride All

Order allow, deny

Allow from all



If you've finished editing do not forget to save back the file.

okay .. Puspa now in the editing of the configuration steps are added to configuration in httpd-vhost.conf file located in C: \ xampp \ apache \ conf \ extra. Open the file with Notepad or WordPad and then tambai file with the following code:



DocumentRoot C: / www/sma1jogja.com # This is a directory rootnya ..

ServerName sma1jogja.com this # domain that has been made earlier





DocumentRoot C: / xampp / htdocs

ServerName localhost



okay dah .. konigurasi finally completed all the editing is not finished yet ... nka next step is to create a root directory. It serves as a place of our web files. The trick is to create a folder in C: \ with the name of the www and then enter a web that has been your files into folders for TSB. Do not forget to name the folders therein shall be equal to the root directory that you've defined.

If all the above configuration is complete, run the restart atao XAMPPnya XAMMP if that was the road.

Testing with the browser, and in the address bar enter the domain where we have made

0 komentar:

Posting Komentar