一、Apache服務端口被占用
1、在XAMPP中啟動Apache服務發現提示錯誤,如下圖所示。
15:00:37 [Apache] Error: Apache shutdown unexpectedly. 15:00:37 [Apache] This may be due to a blocked port, missing dependencies, 15:00:37 [Apache] improper privileges, a crash, or a shutdown by another method. 15:00:37 [Apache] Press the Logs button to view error logs and check 15:00:37 [Apache] the Windows Event Viewer for more clues 15:00:37 [Apache] If you need more help, copy and post this
15:00:37 [Apache] entire log window on the forums
15:00:37[apache]錯誤:apache意外關閉。
15:00:37[apache]這可能是由於端口被阻塞、缺少依賴項,
15:00:37[apache]權限不正確、崩潰或被其他方法關閉。
15:00:37[apache]按logs按鈕查看錯誤日志並檢查
15:00:37[apache]Windows事件查看器以獲取更多線索
15:00:37[apache]如果需要更多幫助,請復制並發布此
15:00:37[apache]論壇上的整個日志窗口
端口被占用,我們換一個。
二、修改Apache端口
1、修改service and port settings
這里我修改為Main Port:801 SSL Port:4430
2、打開Apache的config的httpd.conf文件修Listen字段。
a、修改httpd.conf文件
Listten 80 改為我們設置的801
b、修改httpd-ssl.conf文件
Listen:443修改為我們設置的4430
都修改完成之后,重啟Apache服務,點擊Start啟動成功。
注意:修改了默認的80端口之后,訪問主頁需要加上端口。
訪問127.0.0.1變成了127.0.0.1:801
如下圖所示:127.0.0.1:801/dashboard/