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

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

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


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

<VirtualHost *:80> apache

    ServerAdmin webmaster@dummy-host2.localhost服务器

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

    ServerName www.dev.com (本身命名)post

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

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

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

   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

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

修改端口的操做以下,

一、修改以下两个端口

wKiom1hiNEzg3jX-AAGcorbozuA659.png-wh_50

二、打开以下两个配置文件,将里面的1中原有端口所有修改成1中修改后的端口

wKioL1hiNF2j3i_3AADxTU8QCNc734.png-wh_50

修改为功后,仍是访问不了配置的站点。因而又找到一个网上的解决办法,将 CustomLog "D:/xampp_log/VendorPlatform.log" combined这一段所有删掉,因而能够访问了。

相关文章
相关标签/搜索