啟動的Apache過程中,有時候因為監聽端口沖突,會報錯而啟動失敗,類似的錯誤信息如下:
17:09:04 [Apache] Error: Apache shutdown unexpectedly.
17:09:04 [Apache] This may be due to a blocked port, missing dependencies,
17:09:04 [Apache] improper privileges, a crash, or a shutdown by another method.
17:09:04 [Apache] Press the Logs button to view error logs and check
17:09:04 [Apache] the Windows Event Viewer for more clues
17:09:04 [Apache] If you need more help, copy and post this
17:09:04 [Apache] entire log window on the forums
17:09:12 [Apache] Problem detected!
17:09:12 [Apache] Port 443 in use by ""E:\Program Files (x86)\VMware Workstation\vmware-hostd.exe" -u "C:\ProgramData\VMware\hostd\config.xml"" with PID 2952!
17:09:12 [Apache] Apache WILL NOT start without the configured ports free!
17:09:12 [Apache] You need to uninstall/disable/reconfigure the blocking application
17:09:12 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
對于這個錯誤,解決方法是更換監聽的端口,點擊進行Apache配置文件httpd-ssl.conf
修改監聽的端口
#
# When we also provide SSL we have to listen to the
# standard HTTP port (see above) and to the HTTPS port
# Listen 4450
<?php
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0;
/*
* First server
*/
$i++;
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';