Tags Posts tagged with "virtualhost xampp"

virtualhost xampp

0 15

Tutorial membuat virtualhost xampp windows

virtualhost adalah host buatan atau simulasi host pada server lokal, contoh: http://localhost/ menjadi http://alamat-web.com, Jadi nanti kita bisa membuat lebih dari satu domain virtual yang disimpan di dir: C:WWW. Langkahnya adalah:

1. Instal XAMPP
2. Buka file host (C:WINDOWSsystem32driversetc)
3. Buat perubahan file tersebut
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:

127.0.0.1 localhost
127.0.0.1 madhidamad.com

4. Buka file httpd.conf (C:xamppapacheconf), ubah directory permission agar bisa diakses oleh siapapun.

Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all

5. Buka file httpd-vhosts.conf (C:xamppapacheconfextra), tambahkan ServerName dan DocumentRoot.
6. Cari NameVirtualHost, lalu hilangkan komentarnya (##), jadi seperti dibawah:
NameVirtualHost *:80
7. Tambahkan virtualhost Anda yang terdiri dari ServerName dan DocumentRoot.
#VirtualHost Anda

DocumentRoot C:/www/madhidamad.com
ServerName madhidamad.com

#Untuk membedakan localhost dengan virtualHost Anda:

DocumentRoot C:/xampp/htdocs
ServerName localhost

8. save

Demikian penjelasan singkatnya, semoga bermanfaat.