XAMPP配置httpd-vhosts.conf后无法启动

apache打开Include conf/extra/httpd-vhosts.conf,就无法起动  

XAMPP用于安装部署PHP工程还是很方便的,不过今天碰到一个无法启动apache服务器的问题。


XAMPP配置站点的文件为:httpd-vhosts.conf,配置格式如下,

<VirtualHost *:80> 

    ServerAdmin webmaster@dummy-host2.localhost

    DocumentRoot "程序带访问也的路径"

    ServerName www.dev.com (自己命名)

    ErrorLog "logs/dummy-host2.localhost-error_log"

    CustomLog "D:/xampp_log/VendorPlatform.log" combined

    <Directory "程序带访问也的路径">

   DirectoryIndex index.php index.htm index.shtml index.html (访问页的文件名)

    Options Includes FollowSymLinks ExecCGI

    AllowOverride All

    Allow from all

    </Directory>

</VirtualHost>

但是,我在本地配置了后总是访问不了,

报如下错误:

[Apache] Error: Apache shutdown unexpectedly.

[Apache] This may be due to a blocked port, missing dependencies, 

[Apache] improper privileges, a crash, or a shutdown by another method.

[Apache] Press the Logs button to view error logs and check

[Apache] the Windows Event Viewer for more clues

[Apache] If you need more help, copy and post this

[Apache] entire log window on the forums

根据网上查了下,还修改了端口。

修改端口的操作如下,

1、修改如下两个端口

wKiom1hiNEzg3jX-AAGcorbozuA659.png-wh_50

2、打开如下两个配置文件,将里面的1中原有端口全部修改为1中修改后的端口

wKioL1hiNF2j3i_3AADxTU8QCNc734.png-wh_50

修改成功后,还是访问不了配置的站点。于是又找到一个网上的解决办法,将 CustomLog "D:/xampp_log/VendorPlatform.log" combined这一段全部删掉,于是可以访问了。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值