Home > Pemrograman > Virtual Host di Apache

Virtual Host di Apache

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
  1. No comments yet.
  1. No trackbacks yet.

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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.