Virtual Host pada server lokal

  1. Buka httpd.conf pada direktori C:/Apache2/conf/ (Win XP).
  2. Tambahkan pada httpd.conf

    • NameVirtualHost 127.0.0.1
    • ServerAdmin admin@virtualhost.com
    • DocumentRoot D:\www\dir\wirya.com
    • ServerName www.virtualhost.com
    • ServerAlias www.virtualhost.com *.www.virtualhost.com
  3. Sesuaikan dengan document root Anda/ folder yang menyimpan file yang akan diakses lewat virtual host.
  4. buka file host pada direktori C:/Windows/System32/Driver/etc/
  5. Tembahkan ini 127.0.0.1 www.virtualhost.com
  6. Restart Apache Anda, Start menu->Programs->Apache HTTP Server 2.0.58->Control Apache Server->Restart
  7. Buka browser, ketikkan http://www.virtualhost.com, akan tampil sebuah halaman yang berada
  8. Selesai.

Popularity: 4% [?]

About kadek

I Kadek Wirya
This entry was posted in PHP and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>