| Apache2のインストールとテスト(Windows) |
| Apache2の設定(Windows) |
| Apache2のシステムがインストールされている場所 ServerRoot "C:/Program Files/Apache Group/Apache2" |
| バーチャルホストの設定 # UseCanonicalName: Determines how Apache constructs self-referencing # URLs and the SERVER_NAME and SERVER_PORT variables. # When set "Off", Apache will use the Hostname and Port supplied # by the client. When set "On", Apache will use the value of the # ServerName directive. # UseCanonicalName Off UseCanonicalName On (バーチャルホスト設定の時にOnにする) |
| DocumentRootの設定 (最初の設定) #DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs" (自分の好きなRootに設定) DocumentRoot "C:/***/***/" |
| 変更箇所、Directoryの設定 (最初の設定) #<Directory "C:/Program Files/Apache Group/Apache2/htdocs"> (DocumentRootと同じ設定) <Directory "C:/***/***"> |
| 変更箇所、CGIの設定1 Options Indexes FollowSymLinks MultiViews ExecCGI Includes (この部分を追加) |
| 変更箇所、UserDirの設定 #UserDir "My Documents/My Website" UserDir "C:/home/*/public_html" # # Control access to UserDir directories. The following is an example # for a site where these directories are restricted to read-only. # # You must correct the path for the root to match your system's configured # user directory location, e.g. "C:/WinNT/profiles/*/My Documents/My Website" # or whichever, as appropriate. # #<Directory "C:/Documents and Settings/*/My Documents/My Website"> # AllowOverride FileInfo AuthConfig Limit # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec # <Limit GET POST OPTIONS PROPFIND> # Order allow,deny # Allow from all # </Limit> # <LimitExcept GET POST OPTIONS PROPFIND> # Order deny,allow # Deny from all # </LimitExcept> #</Directory> |
| 変更箇所、最初に探すIndexの設定 DirectoryIndextがhtmの場合はindex.htm DirectoryIndex index.htm index.html index.html.var |
| 追加箇所、manualの表示設定 Alias /ap_manual "C:/usr/local/html" <Directory "C:/usr/local/html"> Options Indexes FollowSymLinks MultiViews IncludesNoExec AddOutputFilter Includes html AllowOverride None Order allow,deny Allow from all </Directory> |
| 変更箇所、CGIを稼動させるディレクトリーの設定 #ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/" CGIを稼動させたいディレクトリーを指定 ScriptAlias /cgi-bin/ "C:/***/***/" |
| 変更箇所、CGI設定を稼動させるコマンドを追加 #<Directory "C:/Program Files/Apache Group/Apache2/cgi-bin"> <Directory "C:/www/public_html/cgi-bin/"> AllowOverride None Options ExecCGI (この部分を追加) Order allow,deny Allow from all </Directory> |
| 変更箇所、日本語の設定 最初のエンコードを日本語に設定 LanguagePriority ja en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv tw |
| 変更箇所、エンコードの設定 最初の設定 #AddDefaultCharset iso8859-1 SHIFT_JISに設定 AddDefaultCharset SHIFT_JIS |
| 変更箇所、image、グラフィック表示の設定 AddType application/x-tar .tgz この部分を追加 AddType image/x-icon .ico |
| 変更箇所、CGIの設定3 この部分を追加 AddHandler cgi-script .cgi AddHandler cgi-script .pl CGIとplを有効にする |
| 変更箇所 AddHandler send-as-is asis |
| 変更箇所 AddHandler imap-file map |
| 変更箇所 AddType text/html .shtml AddOutputFilter INCLUDES .shtml AddType text/html .html AddOutputFilter INCLUDES .html |
| バーチャルホストの設定 #NameVirtualHost * (*は通常このままで大丈夫(もしくはプライベートIP)) # #<VirtualHost *>(上と同じ設定) # ServerAdmin mailアドレス # DocumentRoot c:/***/*** # ServerName ドメイン # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common #</VirtualHost> *バーチャルホストはフォルダ単位での設定で、ファイル単位での設定はできなかった。 *バーチャルホスト稼動時のCGIは、また別な設定がいるみたい(?) |
| http://www.apache.jp/ Apache日本語サイト http://httpd.apache.org/docs-2.0/ Apache2サーバーバージョン2.0ドキュメント |