apache二级域名设置

「已注销」 2014-05-25 04:32:47
这是我的设置
httpd.conf
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteMap vhost txt:/etc/httpd/vhost.map
RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
RewriteCond ${vhost:%1} ^(/.*)$

vhost.map
www.abc.com
phpmyadmin.abc.com

上述两个网站均能正常访问

但是访问www.abc.com/order就报错

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


求解答。。。
...全文
107 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
「已注销」 2014-05-27
  • 打赏
  • 举报
回复
额 好了 是我写错了 抱歉 请问你会vhost.map的写法吗? 里面也需要使用rewriter规则
「已注销」 2014-05-27
  • 打赏
  • 举报
回复
不行 你这个跟我的方法是一样的 没区别
「已注销」 2014-05-27
  • 打赏
  • 举报
回复
谢谢 我先去试试
Holy_Rain 2014-05-26
  • 打赏
  • 举报
回复
最好用:Apache 虚拟主机 VirtualHost 配置 +++++++++++++++++++ 1.修改Apache配置文件(httpd.conf),如下: # Virtual hosts Include conf/extra/httpd-vhosts.conf 2.修改虚拟主机配置文件(\conf\extra\httpd-vhosts.conf),添加配置信息如下: NameVirtualHost *:80 <VirtualHost *:80> ServerName mall.abc.com ServerAlias passport.abc.com www.abc.com my.abc.com DocumentRoot "E:/mall.abc.com" <Directory "E:/mall.abc.com"> Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerName demo.abc.com DocumentRoot "D:/web/abc.abc.com" <Directory "D:/web/abc.abc.com"> Allow from all </Directory> </VirtualHost> 3.重启Apache +++++++++++++++++++

24,923

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Apache
社区管理员
  • Apache
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧