Membuat Virtual Host pada Linux RedHat

Membuat Virtual Host

1. Setting pada folder httpd-vhost.conf

cari di folder (opt/lampp/etc/extra/httpd-vhost.conf)

Ketikkan :

<VirtualHost *:80>

ServerName www1.hura-hura.com

ServerPath /opt/lampp/htdocs/www1

DocumentRoot /opt/lampp/htdocs/www1

</VirtualHost>

<VirtualHost *:80>

ServerName www2.hura-hura.com

ServerPath /opt/lampp/htdocs/www2

DocumentRoot /opt/lampp/htdocs/www2

</VirtualHost>

2. Kemudian Edit file httpd.conf

Yang terletak pada (opt/lampp/etc/httpd.conf)

cari file :

#virtual host

include etc/extra/httpd-vhost.conf

3.Edit file hosts

Terletak pada (/  etc)

127.0.0.1 localhost.localdomain localhost

10.1.82.59      test.hura-hura.com         test.hura-hura.com

10.1.82.59      test1.hura-hura.com       test1.hura-hura.com

4. Tes buat file index.php di folder /opt/lampp/htdocs/test

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s