Apache2 インストール
Apache2ダウンロード
Apache2インストール
1.ダウンロードしたapache_2.x.x-win32-x86-no_ssl.msiをダブルクリック。
2.「Next」をクリック
3.「I accept the terms in the license agreement」を選択して「Next」をクリック。
4.「Next」をクリック。
5.server's information設定
NetworkDomainに「example.com」を入力。
ServerNameに「www.example.com」を入力。
Administrator'sEmailAddressに「webmaster@example.com」を入力。
「for All Users, on Port 80, as a Service -- Recommended.」を選択して「Next」をクリック。
6.「Typical」を選択して「Next」をクリック。
7.「Next」をクリック。
8.「Install」をクリック。
9.「Finish」をクリックしてインストール完了。
インストール確認
Apache2設定 (C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf)
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
↓
DocumentRoot "D:/public_html" ←変更
#<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
↓
<Directory "D:/public_html"> ←変更
Options Indexes FollowSymLinks
↓
Options IncludesNoExec ExecCGI FollowSymLinks ←変更 (217行目付近)
AllowOverride None
↓
AllowOverride All ←変更 (224行目付近)
DirectoryIndex index.html
↓
DirectoryIndex index.html index.cgi index.php ←追加 (239行目付近)
ヒント
Apacheを再起動するとhttpd.confの設定が反映されます。