apache打开Include conf/extra/httpd-vhosts.conf,就无法起动
XAMPP用于安装部署PHP工程还是很方便的,不过今天碰到一个无法启动apache服务器的问题。
XAMPP配置站点的文件为:httpd-vhosts.conf,配置格式如下,
<VirtualHost *:80>
ServerAdmin [email protected]
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、修改如下两个端口
2、打开如下两个配置文件,将里面的1中原有端口全部修改为1中修改后的端口
修改成功后,还是访问不了配置的站点。于是又找到一个网上的解决办法,将 CustomLog "D:/xampp_log/VendorPlatform.log" combined这一段全部删掉,于是可以访问了。
转载于:https://blog.51cto.com/yangyoushan/1886614