首页上一页 1 下一页尾页 6 条记录 1/1页
关于虚拟主机配置与apache启动问题
发表在PHP图书答疑
2013-01-31
是否精华
是
否
版块置顶:
是
否
设置时间:
非永久
永久
起始时间:
结束时间:
是否扣分:
是
否
老师,您好,我遇到一个问题需要解决
是关于虚拟主机配置问题,请帮忙帮我解决啊?弄了好多天,一直没解决.
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf前面的"#"去掉后apache就不能启动了.加上"#"就能启动apache.不知道问题出在哪里?
我的虚拟主机是这样配置的
NameVirtualHost
VirtualHost 127.0.0.1:8081
Listen 127.0.0.1:8081
<VirtualHost 127.0.0.1:8081>
DocumentRoot "C:/AppServ/www/hspzf/public"
ServerName myzf.com
<Directory/>
Options FollowSymLinks
Allowoverride none
order allow ,deny
Allow from all
</Directory>
</virtualHost>
是关于虚拟主机配置问题,请帮忙帮我解决啊?弄了好多天,一直没解决.
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf前面的"#"去掉后apache就不能启动了.加上"#"就能启动apache.不知道问题出在哪里?
我的虚拟主机是这样配置的
NameVirtualHost
VirtualHost 127.0.0.1:8081
Listen 127.0.0.1:8081
<VirtualHost 127.0.0.1:8081>
DocumentRoot "C:/AppServ/www/hspzf/public"
ServerName myzf.com
<Directory/>
Options FollowSymLinks
Allowoverride none
order allow ,deny
Allow from all
</Directory>
</virtualHost>
精彩评论 6
2013-02-01
沙发
读者您好:
关于您提出的问题,请您根据以下几个方面查找原因
1.C:/AppServ/www/hspzf/public 路径是否是真实存在的
2.配置文件中是否有多余的空格
3.如果都没有检查出来,请查看apache log目录下的error.log,是否给出错误原因
4.如果error.log里面没有记录,建议您进入cmd命令行下面进入到apache的bin目录下,输入httpd命令,查看错误提示
具体命令为:例如要进入D:\appserv\appche\bin
cmd---D:
---cd appServ\appche\bin
---httpd
如果问题还未解决,请继续留言。
关于您提出的问题,请您根据以下几个方面查找原因
1.C:/AppServ/www/hspzf/public 路径是否是真实存在的
2.配置文件中是否有多余的空格
3.如果都没有检查出来,请查看apache log目录下的error.log,是否给出错误原因
4.如果error.log里面没有记录,建议您进入cmd命令行下面进入到apache的bin目录下,输入httpd命令,查看错误提示
具体命令为:例如要进入D:\appserv\appche\bin
cmd---D:
---cd appServ\appche\bin
---httpd
如果问题还未解决,请继续留言。
2013-02-01
板凳
具体命令为:例如要进入D:\appserv\appche\bin
cmd---D:
---cd appServ\appche\bin
---httpd
回复:老师,你好,谢谢你的回复.我按照你提供的命令,dos输出如下:
httpd: Syntax error on line 560 of C:/AppServ/Apache2.2/conf/httpd.conf: Syntax
error on line 57 of C:/AppServ/Apache2.2/conf/extra/httpd-vhosts.conf: Expected
</Directory/> but saw </Directory>
不知怎样改动才能正常启动?
2013-02-01
地板
[FIELDSET][LEGEND]引自:3楼[/LEGEND]
具体命令为:例如要进入D:\appserv\appche\bin
cmd---D:
---cd appServ\appche\bin
---httpd
回复:老师,你好,谢谢你的回复.我按照你提供的命令,dos输出如下:
httpd: Syntax error on line 560 of C:/AppServ/Apache2.2/conf/httpd.conf: Syntax
error on line 57 of C:/AppServ/Apache2.2/conf/extra/httpd-vhosts.conf: Expected
</Directory/> but saw </Directory>
不知怎样改动才能正常启动?
[/FIELDSET]
回复:
<Directory/>这里,请您写上相对应的目录名,如:<Directory "C:/AppServ/www/hspzf/public">并且去掉后面"/"
具体命令为:例如要进入D:\appserv\appche\bin
cmd---D:
---cd appServ\appche\bin
---httpd
回复:老师,你好,谢谢你的回复.我按照你提供的命令,dos输出如下:
httpd: Syntax error on line 560 of C:/AppServ/Apache2.2/conf/httpd.conf: Syntax
error on line 57 of C:/AppServ/Apache2.2/conf/extra/httpd-vhosts.conf: Expected
</Directory/> but saw </Directory>
不知怎样改动才能正常启动?
[/FIELDSET]
回复:
<Directory/>这里,请您写上相对应的目录名,如:<Directory "C:/AppServ/www/hspzf/public">并且去掉后面"/"
2013-02-01
4L
下面加粗有颜色的部分是第560行,不知道怎么改动
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
[font size=4][font color=#00FF00]#ServerName adsf hp:80
[/font][/font]# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/AppServ/www"
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
[font size=4][font color=#00FF00]#ServerName adsf hp:80
[/font][/font]# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/AppServ/www"
2013-02-01
5L
[FIELDSET][LEGEND]引自:3楼[/LEGEND]
[FIELDSET][LEGEND]引自:3楼[/LEGEND]
具体命令为:例如要进入D:\appserv\appche\bin
cmd---D:
---cd appServ\appche\bin
---httpd
回复:老师,你好,谢谢你的回复.我按照你提供的命令,dos输出如下:
httpd: Syntax error on line 560 of C:/AppServ/Apache2.2/conf/httpd.conf: Syntax
error on line 57 of C:/AppServ/Apache2.2/conf/extra/httpd-vhosts.conf: Expected
</Directory/> but saw </Directory>
不知怎样改动才能正常启动?
[/FIELDSET]
回复:
<Directory/>这里,请您写上相对应的目录名,如:<Directory "C:/AppServ/www/hspzf/public">并且去掉后面"/"
[/FIELDSET]
回复:老师,您好,我按照你提供的路径,在用httpd于dos命令
输出为
C:\AppServ\Apache2.2\bin>httpd
Warning: DocumentRoot [C:/www/docs/dummy-host.appservnetwork.com] does not exist
Warning: DocumentRoot [C:/www/docs/dummy-host2.appservnetwork.com] does not exis
t
Syntax error on line 47 of C:/AppServ/Apache2.2/conf/extra/httpd-vhosts.conf:
Invalid command 'VirtualHost', perhaps misspelled or defined by a module not inc
luded in the server configuration
不知道怎样改动?
[FIELDSET][LEGEND]引自:3楼[/LEGEND]
具体命令为:例如要进入D:\appserv\appche\bin
cmd---D:
---cd appServ\appche\bin
---httpd
回复:老师,你好,谢谢你的回复.我按照你提供的命令,dos输出如下:
httpd: Syntax error on line 560 of C:/AppServ/Apache2.2/conf/httpd.conf: Syntax
error on line 57 of C:/AppServ/Apache2.2/conf/extra/httpd-vhosts.conf: Expected
</Directory/> but saw </Directory>
不知怎样改动才能正常启动?
[/FIELDSET]
回复:
<Directory/>这里,请您写上相对应的目录名,如:<Directory "C:/AppServ/www/hspzf/public">并且去掉后面"/"
[/FIELDSET]
回复:老师,您好,我按照你提供的路径,在用httpd于dos命令
输出为
C:\AppServ\Apache2.2\bin>httpd
Warning: DocumentRoot [C:/www/docs/dummy-host.appservnetwork.com] does not exist
Warning: DocumentRoot [C:/www/docs/dummy-host2.appservnetwork.com] does not exis
t
Syntax error on line 47 of C:/AppServ/Apache2.2/conf/extra/httpd-vhosts.conf:
Invalid command 'VirtualHost', perhaps misspelled or defined by a module not inc
luded in the server configuration
不知道怎样改动?
2013-02-02
6L
[FIELDSET][LEGEND]引自:5楼[/LEGEND]
[FIELDSET][LEGEND]引自:3楼[/LEGEND]
[FIELDSET][LEGEND]引自:3楼[/LEGEND]
具体命令为:例如要进入D:\appserv\appche\bin
cmd---D:
---cd appServ\appche\bin
---httpd
回复:老师,你好,谢谢你的回复.我按照你提供的命令,dos输出如下:
httpd: Syntax error on line 560 of C:/AppServ/Apache2.2/conf/httpd.conf: Syntax
error on line 57 of C:/AppServ/Apache2.2/conf/extra/httpd-vhosts.conf: Expected
</Directory/> but saw </Directory>
不知怎样改动才能正常启动?
[/FIELDSET]
回复:
<Directory/>这里,请您写上相对应的目录名,如:<Directory "C:/AppServ/www/hspzf/public">并且去掉后面"/"
[/FIELDSET]
回复:老师,您好,我按照你提供的路径,在用httpd于dos命令
输出为
C:\AppServ\Apache2.2\bin>httpd
Warning: DocumentRoot [C:/www/docs/dummy-host.appservnetwork.com] does not exist
Warning: DocumentRoot [C:/www/docs/dummy-host2.appservnetwork.com] does not exis
t
Syntax error on line 47 of C:/AppServ/Apache2.2/conf/extra/httpd-vhosts.conf:
Invalid command 'VirtualHost', perhaps misspelled or defined by a module not inc
luded in the server configuration
不知道怎样改动?
[/FIELDSET]
回复:
您好
提示C:/www/docs/dummy-host2.appservnetwork.com目录不是真实存在的,请将此处改为您系统中实际存在的项目目录
[FIELDSET][LEGEND]引自:3楼[/LEGEND]
[FIELDSET][LEGEND]引自:3楼[/LEGEND]
具体命令为:例如要进入D:\appserv\appche\bin
cmd---D:
---cd appServ\appche\bin
---httpd
回复:老师,你好,谢谢你的回复.我按照你提供的命令,dos输出如下:
httpd: Syntax error on line 560 of C:/AppServ/Apache2.2/conf/httpd.conf: Syntax
error on line 57 of C:/AppServ/Apache2.2/conf/extra/httpd-vhosts.conf: Expected
</Directory/> but saw </Directory>
不知怎样改动才能正常启动?
[/FIELDSET]
回复:
<Directory/>这里,请您写上相对应的目录名,如:<Directory "C:/AppServ/www/hspzf/public">并且去掉后面"/"
[/FIELDSET]
回复:老师,您好,我按照你提供的路径,在用httpd于dos命令
输出为
C:\AppServ\Apache2.2\bin>httpd
Warning: DocumentRoot [C:/www/docs/dummy-host.appservnetwork.com] does not exist
Warning: DocumentRoot [C:/www/docs/dummy-host2.appservnetwork.com] does not exis
t
Syntax error on line 47 of C:/AppServ/Apache2.2/conf/extra/httpd-vhosts.conf:
Invalid command 'VirtualHost', perhaps misspelled or defined by a module not inc
luded in the server configuration
不知道怎样改动?
[/FIELDSET]
回复:
您好
提示C:/www/docs/dummy-host2.appservnetwork.com目录不是真实存在的,请将此处改为您系统中实际存在的项目目录