Oprek Localhost

06.18.2010 · Posted in basic webmaster

Setelah beberapa saat yang lalu kita belajar localhost. Sekarang kita belajar sedikit cara mengoprek  virtual host.

Cara memindah home directory:

Home directory adalah tempat dimana kita  menaruh file website (script) kita. Default home directory pada apache terletak di C:\Program Files\Apache Software Foundation\Apache2.2\htdocs. Jadi ketika kita memanggil:

http://localhost/aryo.html

Maka server akan memanggil files yg terletak di C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\aryo.html

Daripada susah mencari  dan terlalu panjang  maka kita coba untuk memindah home dir ke D:\website
langkah pertama buka file httpd.conf yg terletak di C:\Program Files\Apache Software Foundation\Apache2.2\conf. Gunakan text editor, disini saya rekomendasikan Notepad++. Cari:

DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

Kemudian ganti dengan:

DocumentRoot "D:/website2"

Agar d:/website dapat dibaca maka carilah:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

Kemudian tambahkan line berikut setelahnya:

<Directory "D:/pungky/website2">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

setelah itu save dan kita restart apache. Kembali ke browser dan kita klik http://localhost, jangan lupa masukkan dulu files di d:\website (umpama aryo.html)


Incoming search terms:

Tags:

Related Article

2 Responses to “Oprek Localhost”

  1. happy week end sob..

Leave a Reply

This Blog will give regular Commentators DoFollow Status. Implemented from IT Blögg

Switch to our mobile site