WEBサーバのインストール
apacheは Japan Apache User Group
binaries/win32をダウンロードします
例
apache_2.0.55-win32-x86-no_ssl.exe ( MSI Installer Package でも可能)
(最新版をダウンロードしてください)
ダウンロードしたファイルをクリックしてインストールしてください
Network Domain subdomain.domain
ServerName subdomain.domain
E-mail yourname@subdomain.domain
私はcustom インストールとし、インストール先を E:としました
インストールができなかった場合(port 80)このページの一番下を見てください
e:\Apache2\conf\httpd.conf を設定変更します
−−−−−−−−−−−−−−−−−−−−−−
ServerAdmin root@localhost
エラー発生時のメールアドレスである
ServerName subdomain.domain:80
サーバ名称(:80 は無くても良い)
#UserDir "My Documents/My Website"
<Directory "C:/Documents and Settings/*/My Documents/My Website">
AllowOverride FileInfo AuthConfig Limit
Options MultiViews SymLinksIfOwnerMatch ExecCGI Includes
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
全ての行の#を削除し、ExecCGI を挿入、IncludesNoExecをIncludesのみにする
ユーザディレクトリでのページを有効にし、cgi,ssiを許可する
Indexes を削除(ディレクトリが表示されるのを防ぐ)
C:/Documents and Settings/*/My Documents/My Website の * は user 名を意味する
HostnameLookups On
Off を On にする(logにおける、IPがhost名に変換される)
AddHandler cgi-script .cgi .pl
cgiを有効にする (plはcgiの一種)
−−−−−−−−−−−−−−−−−−−−−
Apache Service Monitor のアイコンのをクリックして Restartします
これで、Webサーバが動き出します
<Directory "C:Program Files/Apache2/htdocs にメインのページ(index.html)を置きます
http://localhost で呼び出せます
userのページは
C:/Documents and Settings/user名/My Documents/My Website となります
http://localhost/~user名/****.html で呼び出せます
−−−−−−−−−−
サーバをインストールしたパソコンから
ホームページをドメイン名で呼び出せるようにするには
C:\windows\system32\drivers\etc\hosts の内容を変更します
127.0.0.1 localhost subdomain.domain
subdomain.domainを追加してドメイン名とIPを対応させます
http://subdomain/domain で呼び出せます
ユーザ名の前の〜(チルダ)をはずす方法は別途(方法)を参照してください
ーーーーー−−−−−−−−−−−−−−−−
Apacheのインストールで下記の表示が出て、インストールできない場合
[年月日省略][error](720002)指定されたファイルが見つかりません。
No installed service named "Apache2".
Skypeを使っている場合は、「ツール」設定 接続で
「ポート80を代わりに使用する」のチェックをはずす(Skypeの再起動をする)