免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2421 | 回复: 2
打印 上一主题 下一主题

[FreeBSD] 修改虚拟主机配置后启动apache出错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-03-21 01:01 |只看该作者 |倒序浏览
修改虚拟主机配置后启动apache出错,提示如下:
freebsd# /usr/local/sbin/httpd -k start                                       
Syntax error on line 1 of /usr/local/etc/apache22/extra/httpd-vhosts.conf:
Invalid command '\xef\xbb\xbf#', perhaps misspelled or defined by a module not included in the server configuration


下面是httpd-vhosts.conf的前半部分:
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#


看不出第一行有什么问题。请高手指教!

论坛徽章:
0
2 [报告]
发表于 2009-03-21 01:10 |只看该作者
问题解决了,httpd.conf编码格式不对。

论坛徽章:
0
3 [报告]
发表于 2009-03-21 09:42 |只看该作者

回复 #2 yesilike 的帖子

能具体说说吗
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP