我的Apache怎么不能用啊,是什么问题?
在浏览器里输入localhost,或192.168.2.15(我自己的IP地址)显示:
Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.46 (Unix) Server at 192.168.2.15 Port 80
这是什么问题,怎么解决?
问题点数:0、回复次数:4Top
1 楼ms44(ms44)回复于 2003-09-03 17:46:25 得分 0
You don't have permission to access / on this server
可能是你的APACHE中目录的权限不对.
看看吧.
应该没什么大问题的.
chmod一下或者看看APACHE的那些个CONFIG文件Top
2 楼fierygnu(va_list)回复于 2003-09-04 14:45:44 得分 0
查看httpd.conf里的User和Group设置,一般是这样:
User nobody
Group nobody
再看DocumentRoot设置的内容,比如是这样:
DocumentRoot "/usr/local/apache2/htdocs"
现在看看该目录的权限,User和Group必须至少对该目录拥有--x权限。Top
3 楼m0772()回复于 2003-09-04 17:32:06 得分 0
在apache目录下ls -l 所显示的内容为:
total 56
drwxr-xr-x 2 root root 4096 Jul 4 17:34 bin
drwxr-xr-x 2 root root 4096 Jul 4 17:34 build
drwxr-xr-x 2 root root 4096 Jul 4 17:34 cgi-bin
drwxr-xr-x 2 root root 4096 Sep 3 16:09 conf
-rw-r--r-- 1 root root 0 Sep 4 17:13 doc.txt
drwxr-xr-x 3 root root 4096 Jul 4 17:34 error
drwxr-xr-x 2 root root 4096 Sep 4 17:13 htdocs
drwxr-xr-x 3 root root 4096 Jul 4 17:34 icons
drwxr-xr-x 2 root root 4096 Jul 4 17:34 include
drwxr-xr-x 2 root root 4096 Jul 4 17:34 lib
drwxr-xr-x 2 root root 4096 Sep 4 17:07 logs
drwxr-xr-x 4 root root 4096 Jul 4 17:34 man
drwxr-xr-x 14 root root 8192 Jul 4 17:34 manual
drwxr-xr-x 2 root root 4096 Jul 4 17:34 modules
在htdocs下ls -l 所显示的内容为:
total 144
-rw-r--r-- 1 nnn nnn 2160 May 3 2001 apache_pb2_ani.gif
-rw-r--r-- 1 nnn nnn 2414 May 3 2001 apache_pb2.gif
-rw-r--r-- 1 nnn nnn 1463 May 30 2001 apache_pb2.png
-rw-r--r-- 1 nnn nnn 2326 Jul 3 1996 apache_pb.gif
-rw-r--r-- 1 nnn nnn 1385 May 30 2001 apache_pb.png
-rw-r--r-- 1 root root 0 Sep 4 17:13 file.txt
-rw-rw-r-- 1 root root 34 Sep 3 16:48 index.html
-rw-r--r-- 1 nnn nnn 1663 May 21 2002 index.html.ca
-rw-r--r-- 1 nnn nnn 1583 Sep 29 2001 index.html.cz.iso8859-2
-rw-r--r-- 1 nnn nnn 2202 Feb 14 2002 index.html.de
-rw-r--r-- 1 nnn nnn 1508 Jan 20 2001 index.html.dk
-rw-r--r-- 1 nnn nnn 1828 Jan 20 2001 index.html.ee
-rw-r--r-- 1 nnn nnn 1618 Jan 20 2001 index.html.el
-rw-r--r-- 1 nnn nnn 1456 May 4 2001 index.html.en
-rw-r--r-- 1 nnn nnn 1735 Jan 20 2001 index.html.es
-rw-r--r-- 1 nnn nnn 1867 Nov 15 2000 index.html.et
-rw-r--r-- 1 nnn nnn 1505 Sep 29 2001 index.html.fr
-rw-r--r-- 1 nnn nnn 3704 Jan 21 2001 index.html.he.iso8859-8
-rw-r--r-- 1 nnn nnn 1604 Oct 1 2001 index.html.hr.iso8859-2
-rw-r--r-- 1 nnn nnn 1788 Nov 7 2001 index.html.it
-rw-r--r-- 1 nnn nnn 1630 Sep 29 2001 index.html.ja.iso2022-jp
-rw-r--r-- 1 nnn nnn 1543 Jun 11 2002 index.html.ko.euc-kr
-rw-r--r-- 1 nnn nnn 1837 May 21 2002 index.html.lb.utf8
-rw-r--r-- 1 nnn nnn 1968 Jan 20 2001 index.html.nl
-rw-r--r-- 1 nnn nnn 1534 Sep 7 2001 index.html.nn
-rw-r--r-- 1 nnn nnn 1467 Jan 20 2001 index.html.no
-rw-r--r-- 1 nnn nnn 1438 Sep 29 2001 index.html.po.iso8859-2
-rw-r--r-- 1 nnn nnn 1773 Jan 20 2001 index.html.pt
-rw-r--r-- 1 nnn nnn 2046 Feb 13 2003 index.html.pt-br
-rw-r--r-- 1 nnn nnn 1522 Jan 20 2001 index.html.ru.cp-1251
-rw-r--r-- 1 nnn nnn 1515 Sep 29 2001 index.html.ru.cp866
-rw-r--r-- 1 nnn nnn 1520 Jan 20 2001 index.html.ru.iso-ru
-rw-r--r-- 1 nnn nnn 1516 Jan 20 2001 index.html.ru.koi8-r
-rw-r--r-- 1 nnn nnn 2249 Jan 20 2001 index.html.ru.utf8
-rw-r--r-- 1 nnn nnn 1631 Mar 8 04:30 index.html.sv
-rw-r--r-- 1 nnn nnn 2308 May 14 07:17 index.html.var
-rw-r--r-- 1 nnn nnn 1032 May 14 06:17 index.html.zh-tw.big5
其中index.html是我自己加的,其内容应该为,
<html>
<head>hello</head>
<body>
hello
</body>
</html>Top
4 楼m0772()回复于 2003-09-04 17:36:35 得分 0
还是不行,nnn是一个普通用户!Top




