杯具 一个apache配置多域名问题 小弟我搞了好几天了都没搞好 公司新买了一台服务器 然后 公司下面有10个站 全放到这个服务器上 服务器系统是 win 2003系统
我装了apache mysql php环境 本地搭建 wordpress dedecms 都是可以的 网站目录是 d:/www
然后我在目录里面分别建立了 d:/www/blog d:/www/dedecms然后我用了公司的两个域名 做了2个二级域名 (域名这里就不写真实域名了)
blog.aaa.com
dede.bbb.com
全部解析到 公司服务器上然后 我在apache的 httpd-vhosts.conf 里面配置了如下NameVirtualHost *:80
##过滤80访问
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "D:/www/blog/"
ServerName blog.aaa.com
ServerAlias blog.aaa.com
#Options Indexes FollowSymLinks
ErrorLog "D:/WebLogs/error/db_error.log"
CustomLog "D:/WebLogs/Access/db_access.log" common
</VirtualHost><VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "D:/www/dedecms/"
ServerName dede.bbb.com
ServerAlias dede.bbb.com
#Options Indexes FollowSymLinks
ErrorLog "D:/WebLogs/error/db_error.log"
CustomLog "D:/WebLogs/Access/db_access.log" common
</VirtualHost>
我这里配置好了 然后 我重启apache 访问是可以访问了 但是 两个域名 都是访问www根目录 我的配置貌似没生效我应该怎么配置 我去网上查了资料 网上有的说要在http.conf里面配置 有的说直接在httpd-vhosts.conf配置
晕了 我到底改怎么配置 才能每个域名访问到指定的文件夹
我装了apache mysql php环境 本地搭建 wordpress dedecms 都是可以的 网站目录是 d:/www
然后我在目录里面分别建立了 d:/www/blog d:/www/dedecms然后我用了公司的两个域名 做了2个二级域名 (域名这里就不写真实域名了)
blog.aaa.com
dede.bbb.com
全部解析到 公司服务器上然后 我在apache的 httpd-vhosts.conf 里面配置了如下NameVirtualHost *:80
##过滤80访问
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "D:/www/blog/"
ServerName blog.aaa.com
ServerAlias blog.aaa.com
#Options Indexes FollowSymLinks
ErrorLog "D:/WebLogs/error/db_error.log"
CustomLog "D:/WebLogs/Access/db_access.log" common
</VirtualHost><VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "D:/www/dedecms/"
ServerName dede.bbb.com
ServerAlias dede.bbb.com
#Options Indexes FollowSymLinks
ErrorLog "D:/WebLogs/error/db_error.log"
CustomLog "D:/WebLogs/Access/db_access.log" common
</VirtualHost>
我这里配置好了 然后 我重启apache 访问是可以访问了 但是 两个域名 都是访问www根目录 我的配置貌似没生效我应该怎么配置 我去网上查了资料 网上有的说要在http.conf里面配置 有的说直接在httpd-vhosts.conf配置
晕了 我到底改怎么配置 才能每个域名访问到指定的文件夹
# Virtual hosts
Include conf/extra/httpd-vhosts.conf //将这个前面的#去掉
你之前不是设置过了吗?
ErrorLog "D:/WebLogs/error/db_error.log"
CustomLog "D:/WebLogs/Access/db_access.log" common
www.trip58.com/love/index.php
我怎么和一个很不相关的人测的结果也很好?