■手順
【Windows版】
コンフィギュレーションファイルの編集
[スタート]メニューから以下のように選択し、コンフィギュレーションファイルを開きます。
[スタート]
→ [プログラム]
→ [Apache HTTP Server]
→ [Configure Apache Server]
→ [Edit the Apache httpd.conf Configuration File]
環境が上記と異なる場合は、コンフィギュレーションファイルhttpd.confを直接エディタで開いてください。
仮想ディレクトリの設定
ファイルの最後に以下の行を追加します。
ScriptAlias /SQC/cgi-bin/ "<インストールディレクトリ>/www/cgi-bin/" <Directory "<インストールディレクトリ>/www/cgi-bin"> Options ExecCGI AddHandler cgi-script .cgi AllowOverride None Order allow,deny Allow from all </Directory> Alias /SQC/ "<インストールディレクトリ>/www/" <Directory "<インストールディレクトリ>/www"> Options None AllowOverride None Order allow,deny Allow from all </Directory> |
以下の行の先頭の「#」を削除して、CGIを有効にします。
LoadModule cgi_module "C:/Interstage/F3FMihs/modules/mod_cgi.so" |
ファイルの最後に以下の行を追加します。
Alias /SSQC/cgi-bin/js/ "<インストールディレクトリ>/www/cgi-bin/js/" <Directory "<インストールディレクトリ>/www/cgi-bin/js"> Options None AllowOverride None Order allow,deny Allow from all </Directory> Alias /SSQC/cgi-bin/image/ "<インストールディレクトリ>/www/cgi-bin/image/" <Directory "<インストールディレクトリ>/www/cgi-bin/image"> Options None AllowOverride None Order allow,deny Allow from all </Directory> Alias /SSQC/cgi-bin/style/ "<インストールディレクトリ>/www/cgi-bin/style/" <Directory "<インストールディレクトリ>/www/cgi-bin/style"> Options None AllowOverride None Order allow,deny Allow from all </Directory> ScriptAlias /SSQC/cgi-bin/ "<インストールディレクトリ>/www/cgi-bin/" <Directory "<インストールディレクトリ>/www/cgi-bin"> Options ExecCGI AllowOverride None Order allow,deny Allow from all </Directory> Alias /SSQC/ "<インストールディレクトリ>/www/" <Directory "<インストールディレクトリ>/www"> Options None AllowOverride None Order allow,deny Allow from all </Directory> |
注意
アクセス権などの設定は、必要に応じて適宜変更してください。
仮想ディレクトリの設定は、Apacheのバージョンによって異なります。詳細については、Apacheのマニュアルを参照してください。
設定の保存
上書き保存してエディタを終了します。Apache HTTP Serverが起動中の場合、再起動します。
【UNIX版】
コンフィギュレーションファイルの編集
エディタでコンフィギュレーションファイルを開きます。
仮想ディレクトリの設定
仮想ディレクトリを設定します。
ファイルの最後に以下の行を追加します。
ScriptAlias /<エイリアス>/cgi-bin/ "<インストールディレクトリ>/www/cgi-bin/" <Directory "<インストールディレクトリ>/www/cgi-bin"> Options ExecCGI AddHandler cgi-script .cgi AllowOverride None Order allow,deny Allow from all </Directory> Alias /<エイリアス>/ "<インストールディレクトリ>/www/" <Directory "<インストールディレクトリ>/www"> Options None AllowOverride None Order allow,deny Allow from all </Directory> |
注意
アクセス権などの設定は、必要に応じて適宜変更してください。
仮想ディレクトリの設定は、Apacheのバージョンによって異なります。詳細については、Apacheのマニュアルを参照してください。
Apache2.0の初期状態では文字化けを起こす可能性がありますので、必要に応じて、下記の状態に設定して下さい。
AddDefaultCharset Off
設定の保存
上書き保存してエディタを終了します。Apache HTTP Serverが起動中の場合、再起動します。