簡體   English   中英

無法在 xamp 服務器中啟動 Apache 模塊

[英]Unable to start Apache module in xamp server

我最近第一次安裝了xamp服務器,想在本地服務器上運行一個php網站。 當我在 xamp 服務器中啟動 Apache 模塊時,它顯示以下錯誤,但 MySQL 啟動並運行良好:

9:04:58 PM  [Apache]    Attempting to start Apache app...
9:04:58 PM  [Apache]    Status change detected: running
9:04:58 PM  [Apache]    Status change detected: stopped
9:04:58 PM  [Apache]    Error: Apache shutdown unexpectedly.
9:04:58 PM  [Apache]    This may be due to a blocked port, missing dependencies, 
9:04:58 PM  [Apache]    improper privileges, a crash, or a shutdown by another method.
9:04:58 PM  [Apache]    Press the Logs button to view error logs and check
9:04:58 PM  [Apache]    the Windows Event Viewer for more clues
9:04:58 PM  [Apache]    If you need more help, copy and post this
9:04:58 PM  [Apache]    entire log window on the forums

我這樣做是為了我的軟件測試任務。 我必須在本地服務器上測試一個網站,為此我安裝了 xamp 服務器。 任何人都可以幫忙嗎?

在某些情況下,您的網絡管理員或 ISP 會阻止某些端口(盡管我不建議將 Xampp 作為可公開訪問的服務器運行)。

並且端口 80 被一些其他應用程序使用,例如 Skype 等。當您想要訪問 Apache 和這些應用程序時,可能會發生一些沖突,因為此問題您可以選擇更改 Apache 服務器的端口號

如果您的 Apache 服務器不工作,則表明某些其他應用程序正在使用端口 80

讓我們手動完成。 步驟 1:對於此過程,首先打開位於 xampp\\apache\\conf\\ 的 httpd.conf 文件

在我的系統中,我的 xampp 安裝在 c 驅動器中,所以我的路徑是 c:\\xampp\\apache\\conf
您的可能與此不同,因此現在使用文本編輯器或程序員編輯器打開 httpd.conf 文件(我使用的是記事本++) 現在找到顯示 Listen 80 的行。它是第 47 行,否則按 contol+f 並鍵入 80 然后它會自動將 courser 移動到這里,然后將 80 更改為您自己的端口,這里我使用的是 3388。然后按 control+s 保存文件。 保存成功后重啟Apache服務器你的端口號修改成功

對此可能有很多可能的答案。 最常見的是另一個運行在 80 端口的程序。我遇到了同樣的問題,然后我發現我的 Vagrant 盒子運行在 80 端口上。

如果您的計算機上安裝了 Skype,請將 apache 的端口更改為其他端口。

為此,請轉到 xampp/apache/conf/httpd.conf 並更改 httpd.conf 中的以下行:

ServerName localhost:80

ServerName localhost:81

此外,如果它不起作用,請同時更改以下行:

     Listen 80
     to 
     Listen 81

有時,此錯誤是由於您計算機上的其他軟件使用相同的端口而發生的,因此您必須更改端口號或從其他軟件(如虛擬盒等)中禁用相同的端口號

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM