電子書籍の厳選無料作品が豊富!

お世話になります。apache2をrpmでインストールし、squidもrpmでインストールし、sargもrpmでインストールしました。
ドキュメントルートは現在 var/wwwにしています。
http://hostname/だとアパッチ標準が表示されます。
http://hostname/html/index.html だと作成したページが表示されます。
http://hostname/sarg/index.html だと下記エラーが表示されます。
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.

現在のパーミッションです。sargのディレクトリが(drwxr-xr-x 6 root)が6になっている位で他に変わった点が見つかりません。
また、この6の意味を今調べてるのですが、なかなか説明文書にたどりつきません。
どうすれば権限を与えることができるのか?
どなたかご教授ください。よろしくお願いします。

/var/www/
drwxr-xr-x 2 root root 4096 2月 25 2003 cgi-bin
drwxr-xr-x 3 root root 4096 9月 6 10:56 error
drwxr-xr-x 2 root root 4096 9月 7 11:25 html
drwxr-xr-x 3 root root 4096 9月 6 10:56 icons
drwxr-xr-x 6 root root 4096 9月 7 11:02 sarg

ls /sarg -l
drwxr-xr-x 3 root root 4096 9月 7 10:45 ONE-SHOT
drwxr-xr-x 2 root root 4096 6月 30 09:06 daily
-rw-r--r-- 1 root root 1419 6月 30 09:06 index.html
drwxr-xr-x 2 root root 4096 6月 30 09:06 monthly
drwxr-xr-x 2 root root 4096 6月 30 09:06 weekly

ls /html -l
-rw-r--r-- 1 root root 110 9月 7 11:25 index.html

環境(サーバー)
Apache/2.0.40 (Red Hat Linux)
RedHat Lunix release 9 Kernel 2.4.20-8 on an i686

環境(クライアント)
ウィンドウズ2000sp3 IE6

A 回答 (1件)

最近、Apacheをいじっていないので、自信がないので、詳しい説明はできませんが、


まず、ドキュメントルートのディレクトリの中にcgi-binが入っているのはかなり問題です。
cgi-binは外部には公開しないのが原則です。

ドキュメントルートは、
DocumentRoot </var/www/html>
のように変更しましょう。
そして、対応する、
<Directory "/var/www">
ディレクティブを
<Directory "/var/www/html">
に変更しましょう。
sargディレクトリは
/var/www/htmlの中に移動して、
/var/www/html/sarg
としましょう。
そうしたら、
http://hostname/sarg/index.html
できちんと表示されるはずです。

参考URLはWindows向けですが、
http://x-web.pobox.ne.jp/fcgi/fcgi_f4b.html

参考URL:http://x-web.pobox.ne.jp/fcgi/fcgi_f4b.html
    • good
    • 0
この回答へのお礼

ありがとうございます。
実は、このアドバイスを見てfind -name sarg.confと打ったところ、httpd/conf.d/sarg.confというコンフィグを発見いたしました。その中にですね、Allow from 127.0.0.1と・・・これを変更し、ドキュメントルートを元に戻して、動き出しました。
ありがとうございました。

お礼日時:2004/09/07 22:39

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!