XAMPP配置httpd-vhosts.conf后无法启动
apache打開Include conf/extra/httpd-vhosts.conf,就無法起動(dòng) ?
XAMPP用于安裝部署PHP工程還是很方便的,不過今天碰到一個(gè)無法啟動(dòng)apache服務(wù)器的問題。
XAMPP配置站點(diǎn)的文件為: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>
但是,我在本地配置了后總是訪問不了,
報(bào)如下錯(cuò)誤:
[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
根據(jù)網(wǎng)上查了下,還修改了端口。
修改端口的操作如下,
1、修改如下兩個(gè)端口
2、打開如下兩個(gè)配置文件,將里面的1中原有端口全部修改為1中修改后的端口
修改成功后,還是訪問不了配置的站點(diǎn)。于是又找到一個(gè)網(wǎng)上的解決辦法,將 CustomLog "D:/xampp_log/VendorPlatform.log" combined這一段全部刪掉,于是可以訪問了。
轉(zhuǎn)載于:https://blog.51cto.com/yangyoushan/1886614
總結(jié)
以上是生活随笔為你收集整理的XAMPP配置httpd-vhosts.conf后无法启动的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 关于.NET参数传递方式的思考
- 下一篇: AIX和linux SSH互信