Created
April 23, 2011 12:58
-
-
Save nissuk/938585 to your computer and use it in GitHub Desktop.
Apache+XAMPP: VirtualHostを設定する単純な例
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# C:\Windows\System32\drivers\etc | |
# ServerName で指定したドメイン名を127.0.0.1に向けます。 | |
127.0.0.1 dev.localhost |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# C:\xampp\apache\conf\extra\httpd-vhosts.conf | |
# VirtualHostを設定します。 | |
<VirtualHost *:80> | |
DocumentRoot "C:/users/you/dev" | |
ServerName dev.localhost | |
</VirtualHost> | |
# VirtualHostのルートに設定するディレクトリの設定をします。 | |
# ディレクトリの位置とhttpd.confの設定によっては | |
# ここでアクセス許可設定をしないと403 Forbiddenになるので注意してください。 | |
# この例のディレクトリは<Directory />だけにマッチしており、 | |
# <Directory />の設定が「Order deny,allow」「Deny from all」ですべて拒否だったため | |
# localhostだけにアクセスを許可しています。 | |
<Directory "C:/users/you/dev"> | |
Order deny,allow | |
Deny from all | |
Allow from localhost | |
</Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment