由 x-dongzi 在 12-30-2003 12:52 发表:
apache作代理服务器失败!
下面是我的http.conf中的代码,大家看看有什么问题??
1<ifmodule mod_proxy.c="">
2
3ProxyRequests On
4
5
6
7<proxy *="">
8
9Order deny,allow
10
11Deny from all
12
13Allow from 192.168.0.0/24
14
15</proxy>
16
17
18
19#
20
21# Enable/disable the handling of HTTP/1.1 "Via:" headers.
22
23# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
24
25# Set to one of: Off | On | Full | Block
26
27#
28
29#ProxyVia On
30
31
32
33#
34
35# To enable the cache as well, edit and uncomment the following lines:
36
37# (no cacheing without CacheRoot)
38
39#
40
41CacheRoot "/etc/httpd/proxy"
42
43CacheSize 6
44
45CacheGcInterval 4
46
47CacheMaxExpire 24
48
49CacheLastModifiedFactor 0.1
50
51CacheDefaultExpire 1
52
53NoCache a-domain.com another-domain.edu joes.garage-sale.com
54
55
56
57</ifmodule>
End of proxy directives.
这下面是启动出错的信息:
httpd failed. The error was: Stopping httpd: [FAILED]
Starting httpd: Syntax error on line 998 of /etc/httpd/conf/httpd.conf:
Invalid command 'CacheRoot', perhaps mis-spelled or defined by a module not included in the server configuration
[FAILED]
他说的998行就是CacheRoot那一行,我的这个目录本来没有 ,我mkdir 后他还是这样说,难道是我没有加载什么模块?
还有刚开始我写的Allow from 192.168.0.0/254,他有错误,为什么Allow from 192.168.0.0/24就没有错误?192.168.0.0/24是什么意思,我的网络是从192.168.0.1到192.168.0.255的
由 Glue 在 12-30-2003 20:28 发表:
是apache还是apache2?
>
> 源码:
>
> * * *
>
>
> >
>
1<ifdefine !apache2="">
2> >
3> CacheRoot "/var/cache/httpd"
4> >
5> CacheSize 5
6> >
7> CacheGcInterval 4
8> >
9> CacheMaxExpire 24
10> >
11> CacheLastModifiedFactor 0.1
12> >
13> CacheDefaultExpire 1
14> >
15> #NoCache a-domain.com another-domain.edu joes.garage-sale.com
16> >
17> </ifdefine>
> >
>
> >
>
> >
>
1<ifdefine apache2="">
2> >
3> <ifmodule mod_disk_cache.c="">
4> >
5> CacheRoot "/var/cache/httpd"
6> >
7> CacheSize 5
8> >
9> CacheGcInterval 4
10> >
11> CacheMaxExpire 24
12> >
13> CacheLastModifiedFactor 0.1
14> >
15> CacheDefaultExpire 1
16> >
17> #NoCache a-domain.com another-domain.edu joes.garage-sale.com
18> >
19> </ifmodule>
20> >
21> </ifdefine>
> >
>
> >
>
>
> * * *
-_-
由 x-dongzi 在 12-31-2003 03:16