MaxBSD 发表于 2003-03-19 23:02

请前辈们看看,这个apache的功能怎么实现?谢谢

知我者红袖也~~~~。


这是我的httpd.conf。对用户运行php作了限制。

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
...skipping...
<IfModule mod_userdir.c>;
    UserDir /home/*/pub
</IfModule>;

#
# Control access to UserDir directories.The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory /home/*/pub>;
    AllowOverride FileInfo AuthConfig Limit
    php_admin_flag engine Off
    php_admin_flag safe_mode On
    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>;

建一个用户/home/username,然后用pureftpd也建一个用户把家目录指向那里。在那个目录里建一个pub目录,把html文件放到那里就可以访问了。就是这样: www.xxx.com/~username。还不明白我就得手把手来了。

雪之女 发表于 2003-03-21 18:18

请前辈们看看,这个apache的功能怎么实现?谢谢

多谢max前辈的指教,现在,我可以用http://www.abc.com/~xyz/index.html的方式来访问了,但如果用www.abc.com/~xyz却不行,浏览器提示找不到页!
这应该怎样解决?谢谢!

红袖添香 发表于 2003-03-21 18:23

请前辈们看看,这个apache的功能怎么实现?谢谢

原帖由 "雪之女" 发表:
多谢max前辈的指教,现在,我可以用http://www.abc.com/~xyz/index.html的方式来访问了,但如果用www.abc.com/~xyz却不行,浏览器提示找不到页!
这应该怎样解决?谢谢!

httpd.conf 中句设定了吗?

DirectoryIndex index.html

雪之女 发表于 2003-03-21 18:29

请前辈们看看,这个apache的功能怎么实现?谢谢

httpd.conf中有

雪之女 发表于 2003-03-21 18:30

请前辈们看看,这个apache的功能怎么实现?谢谢

<IfModule mod_dir.c>;
    DirectoryIndex index.html index.htm index.php index.php3
</IfModule>;

雪之女 发表于 2003-03-21 18:31

请前辈们看看,这个apache的功能怎么实现?谢谢

在<Directory /home/*/pub>; 中没有,是在主站的部分有!

红袖添香 发表于 2003-03-21 18:39

请前辈们看看,这个apache的功能怎么实现?谢谢

...

哦, 你用了 IfModule, 那有这句吗?

AddModule mod_dir.c 呢

雪之女 发表于 2003-03-21 18:43

请前辈们看看,这个apache的功能怎么实现?谢谢

没有!
里面有很多ifModule,就是没有一个AddModule

红袖添香 发表于 2003-03-21 18:47

请前辈们看看,这个apache的功能怎么实现?谢谢

...

呵呵, 那没加上模块啊. 写上这句话试试.

或者把 <IfModule mod_userdir.c>; 和后面对应的那句</IfModule>;去掉

雪之女 发表于 2003-03-21 22:07

请前辈们看看,这个apache的功能怎么实现?谢谢

试了,还是不行!访问www.abc.com就没有问题,系统自动找到了index.html文件!
下面是我的httpd.conf的usrdir部分
<Directory /home/*/public_html>;
    AllowOverride None
    Options None
    <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>;
页: 1 2 [3] 4
查看完整版本: 请前辈们看看,这个apache的功能怎么实现?谢谢