免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: lpk1986
打印 上一主题 下一主题

[Web] apache 多站点配置 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2008-11-19 00:38 |只看该作者
可参考我的
NameVirtualHost 192.168.18.21
<VirtualHost 192.168.18.21>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /home/my-web-site
    ServerName  192.168.18.21
    DirectoryIndex index.php
</VirtualHost>

service httpd restart

重要的,启动了,如有错误,或日志中的错误贴上来

论坛徽章:
0
12 [报告]
发表于 2008-11-19 13:27 |只看该作者

回复 #11 luo118 的帖子

NameVirtualHost 192.168.1.106
<VirtualHost 192.168.1.106>
    ServerAdmin webmaster@dummy-host.example.com(这一行添什么?我去掉了)
    DocumentRoot /home/lianadmin/www
    ServerName  192.168.1.106
    DirectoryIndex www.eyin.com
</VirtualHost>

/usr/local/httpd/bin/apachtel  restart

我给了所有权限  显示结果
您无权查看该网页
您可能没有权限用您提供的凭据查看此目录或网页。

--------------------------------------------------------------------------------

如果您确信能够查看该目录或网页,请尝试使用 192.168.1.106  主页上所列的电子邮件地址或电话与网站联系。

可以单击搜索,寻找 Internet 上的信息。




HTTP 错误 403 - 禁止访问
Internet Explorer

论坛徽章:
0
13 [报告]
发表于 2008-11-19 13:31 |只看该作者

回复 #8 nsfghost 的帖子

恩 错误还是一样的

论坛徽章:
0
14 [报告]
发表于 2008-11-19 13:32 |只看该作者

回复 #12 lpk1986 的帖子

DirectoryIndex www.eyin.com ,你的默认改了 www.eyin.com 了,
请确定这文件是否存在,

DirectoryIndex 是定义默认页的意思啊.

lz  认真看一下 cu上的 apache man吧!对你有很大的帮助的
http://man.chinaunix.net/newsoft ... N_2.2new/index.html

论坛徽章:
0
15 [报告]
发表于 2008-11-19 13:33 |只看该作者

回复 #13 lpk1986 的帖子

什么错误贴上来

[ 本帖最后由 luo118 于 2008-11-19 13:38 编辑 ]

论坛徽章:
0
16 [报告]
发表于 2008-11-19 13:37 |只看该作者

回复 #14 luo118 的帖子

谢谢 我去看看

论坛徽章:
0
17 [报告]
发表于 2008-11-19 13:37 |只看该作者
改為如下
NameVirtualHost 192.168.1.106
<VirtualHost 192.168.1.106>
    ServerAdmin webmaster@dummy-host.example.com  #這是管理員郵箱可以不要
    DocumentRoot /home/lianadmin/www/
    ServerName  192.168.1.106
    DirectoryIndex index.htm index.php index.html
    <Directory "/home/lianadmin/www/">           #這些你看一下發給你的cu裏的 man 吧
         AllowOverride None
        Order allow,deny
        Allow from all
      </Directory>
</VirtualHost>

/usr/local/httpd/bin/apachtel  restart

论坛徽章:
0
18 [报告]
发表于 2008-12-11 21:53 |只看该作者
在\conf\extra\httpd-vhosts.conf 文件中添加:
<VirtualHost *:80>
        DocumentRoot "C:/bbs"   
        ServerName bbs.xxx.com
        <Directory "C:/bbs">
            Options Indexes FollowSymLinks
            AllowOverride None
            Order allow,deny
            Allow from all
        </Directory>
</VirtualHost>

注意修改文件:httpd.conf

#LoadModule authz_host_module modules/mod_authz_host.so

#Include conf/extra/httpd-vhosts.conf
找到这两行把前面的#去掉试试。

论坛徽章:
0
19 [报告]
发表于 2008-12-18 16:19 |只看该作者

回复 #1 lpk1986 的帖子

会不会是没有打开虚拟主机的原因!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP