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這一段所有刪掉,因而能夠訪問了。

相關文章
相關標籤/搜索