07/12
2010
2010
- WindowsのapacheのVirtualHost設定(テスト)
- 7月 12, 2010 0
WindowsのローカルのVirtualHostでのテスト環境の設定をメモしておきます。
あくまでもテスト環境です。
httpd.conf の設定
XAMPPあたりでapacheをインストールした場合はなどは、C:\xampp\apache\confにある
Apacheのhttpd.confを変更します。
ServerNameのコメントアウト
# If your host doesn't have a registered DNS name, enter its IP address here. # You will have to access it by its address anyway, and this will make # redirections work in a sensible way. # #ServerName localhost コメントアウトしてください。
Directoryの書き換え
これで、D、Eなどにもてテスト環境が構築できます。
<Directory />
Options All
AllowOverride All
Order deny,allow
</Directory>
NameVirtualHost *:80の追加
NameVirtualHost *:80
httpd.conf にVirtualHostの設定を追加します。
<virtualhost *:80>
DocumentRoot D:\work/JCS/wp ドメインのRoot
ServerName test.local指定したいドメイン
</virtualhost>
apacheの再起動
サイトが確認できたら終わりです。

Ayumi Mizoshiri
No Comments, Comment or Ping
Reply to “WindowsのapacheのVirtualHost設定(テスト)”