2013年6月20日木曜日

apacheのリダイレクト設定・バーチャルホストの場合

......中略........
<VirtualHost :80*>
ServerName www.example.jp
Redirect / http://www.example.com/
</VirtualHost>
......中略........


※www.example.jpにアクセスすると,www.example.comに転送される。

2013年6月6日木曜日

VirtualHostの設定・フォルダ飛ばし

test.hogehoge.netのhtmlを直接見に行かせる。
この場合、folder2のディレクトリにindex.htmlなどを入れてテストした。

<VirtualHost *:80>
 DocumentRoot /var/www/html/hogehogefolder/folder1/folder2
 ServerName hogehoge.com
 ServerAlias test.hogehoge.net
 Options FollowSymLinks ExecCGI
</VirtualHost>

フォルダ飛ばせていいかんじー
NameVirtualHost *:80がコメントアウト#になってるからはずすね。

2013年6月3日月曜日