環境設定ファイル
/etc/httpd/
conf/httpd.conf |
修正前 |
修正後 |
実行するユーザと
グループの定義
|
User nobody
Group #-1 |
User nobody
Group nobody |
|
管理者のメールアドレス
|
ServerAdmin you@example.com |
ServerAdmin
email@my-server.homelinux.com |
|
サーバ名の設定
|
#ServerName www.example.com:80 |
ServerName my-server.homelinux.com |
|
ドキュメントルートの設定
|
DocumentRoot "/var/www/html" |
DocumentRoot "/home/web" |
ドキュメントルートでの
CGI/SSIの実行権付与と
インデックスリストの
非表示設定
|
<Directory "/var/www/html">
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory> |
<Directory "/home/web">
Options FollowSymLinks Includes ExecCGI MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory> |
ディレクトリアクセス時に
検索するファイルの設定
|
DirectoryIndex index.html index.html.var |
DirectoryIndex index.php index.html index.html.var |
|
CGIディレクトリの設定
|
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" |
ScriptAlias /cgi-bin/ "/home/web/cgi-bin/" |
|
CGIへのアクセス権設定
|
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory> |
<Directory "/home/web/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory> |
|
文字エンコーディング設定
|
AddDefaultCharset UTF-8 |
#AddDefaultCharset UTF-8 |
|
CGIファイル拡張子の定義
|
#AddHandler cgi-script .cgi |
AddHandler cgi-script .cgi
AddHandler cgi-script .pl |
|
※変更が必要な箇所のみ抜粋 |