No.14898 投稿時間:2004年02月25日(Wed) 19:27 投稿者名:rie URL:
いつもお世話になっております。
早速ではありますが、
290行目の設定で、Apache2のhttpd.confの設定で、
----------------------------------------------------------
UserDir "D:/www/user/*/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 "D:/www/user/*/public_html">
AllowOverride FileInfo AuthConfig Limit
Options MultiViews 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>
----------------------------------------------------------
「Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec」
を
「Options MultiViews SymLinksIfOwnerMatch IncludesNoExec」
と、設定しCGIを特定の(指定された)場所でしか動作させないように上記の設定(記述)にしました。
そして、
537行目の部分で
----------------------------------------------------------
ScriptAlias /cgi-bin/ "D:/www/public_html/cgi-bin/"
ScriptAlias /cgi-bin/ "D:/www/user/*/public_html/cgi-bin/"
----------------------------------------------------------
544行目の部分で↓
# "C:/Apache2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "D:/www/public_html/cgi-bin/">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
<Directory "D:/www/user/*/public_html/cgi-bin/">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
----------------------------------------------------------
を設定しました。
ですが、現在cgi-binとbbsの二つCGIのフォルダを作っており、
上記の設定では、bbsのCGIは動作しないはずなのですが、
「D:/www/user/*/public_html/bbs/」は予定通り動作しません。(指定してないのですからこれが正常ですよね?)
「D:/www/public_html/bbs/」は予定とおりではなく指定していないにもかかわらず動作してしまいます。
そこで、「D:/www/user/*/public_html/bbs/」を動かすための記述で、
ScriptAlias /bbs/ "D:/www/user/*/public_html/bbs/"
と
<Directory "D:/www/user/*/public_html/bbs/">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
を記述したら、動作しました。
ですが、相変わらず、「D:/www/public_html/bbs/」は指定してもしなくてもbbsフォルダでもcgi-binフォルダでも、
動作してしまいます。
なぜなのでしょうか?
結論を言いますと、指示(記述しなければ)動作しないようにしたいのです。
よろしくお願いします。
また、大変恐縮なのですが、Apacheは導入して数日しか経過していない初心者なので、基本的なミスをしているかもしれません。
また、専門的な(多少難しい程度でも)言い回しでは分からないかもしれないので、その辺を含めてアドバイスしていただけないでしょうか。
よろしくお願いします。
No.14902 投稿時間:2004年02月25日(Wed) 23:50 投稿者名:Linuxさば挑戦中・・・ URL:
ここがおすすめです。
http://www2j.biglobe.ne.jp/~apollo/server/server.html
No.14913 投稿時間:2004年02月26日(Thu) 15:12 投稿者名:rie URL:
> ここがおすすめです。
> http://www2j.biglobe.ne.jp/~apollo/server/server.html
ありがとうございます。
参考URLでちょっと勉強してきます。
No.14905 投稿時間:2004年02月26日(Thu) 08:16 投稿者名:太郎 URL:
設定したScriptAliasの前に#をつけて試してみたらいかがでしょう。
No.14914 投稿時間:2004年02月26日(Thu) 15:13 投稿者名:rie URL:
> 設定したScriptAliasの前に#をつけて試してみたらいかがでしょう。
ちょっと試してみます。
ありがとうございます
No.14926 投稿時間:2004年02月26日(Thu) 22:16 投稿者名:rie URL:
> > 設定したScriptAliasの前に#をつけて試してみたらいかがでしょう。
>
> ちょっと試してみます。
> ありがとうございます
Options FollowSymLinks・・・
ScriptAlias
<Directory>・・・</Directory>
の組み合わせ記述を組み合わせをひたすらやっていたら解決しました。
ありがとうございます。