Archive

Archive for April, 2008

Virtual Host di Apache

April 1, 2008 Leave a comment

Berikut adalah setting virtual host di apache yang biasa saya gunakan bersama Symfony

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1:80>
DocumentRoot "C:\AppServ\www"
ServerName localhost
</VirtualHost>

<VirtualHost 127.0.0.1:80>
DocumentRoot "C:\AppServ\www\cms3\web"
ServerName www.cms3.com
<Directory "C:\AppServ\www\cms3\web">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order deny,allow
Deny from all
Allow from 127.0.0.1
DirectoryIndex index.php
</Directory>

DirectoryIndex index.php
Alias /sf C:\AppServ\php5\PEAR\data\symfony\web\sf

<Directory "C:\AppServ\php5\PEAR\data\symfony\web\sf">
AllowOverride All
Allow from All
</Directory>

</VirtualHost>

<VirtualHost 127.0.0.1:80>
DocumentRoot "C:\AppServ\www\cmsku\web"
ServerName www.cmsku.com
<Directory "C:\AppServ\www\cmsku\web">
Options Indexes FollowSymLinks Includes
AllowOverride All
Order deny,allow
Deny from all
Allow from 127.0.0.1
DirectoryIndex index.php
</Directory>

DirectoryIndex index.php
Alias /sf C:\AppServ\php5\PEAR\data\symfony\web\sf

<Directory "C:\AppServ\php5\PEAR\data\symfony\web\sf">
AllowOverride All
Allow from All
</Directory>

</VirtualHost>

Juga isi dari file hosts di lingkungan windows (C:\WINDOWS\system32\drivers\etc\hosts)

127.0.0.1 localhost
127.0.0.1 www.cms3.com
127.0.0.1 www.cmsku.com

Categories: Pemrograman
Follow

Get every new post delivered to your Inbox.