apache安裝完之后,右下角的圖標(biāo)卻是紅色的。放鼠標(biāo)上去的提示是:No services installed ,很顯然,是由于服務(wù)沒(méi)有安裝。
解決辦法是:
我的安裝路徑是:C:\Program Files\Apache Software Foundation\Apache2.2
1、打開(kāi)cmd定位到:C:\Program Files\Apache Software Foundation\Apache2.2\bin
2、輸入httpd.exe -k install -n apache2
出現(xiàn)以下提示:
C:\Program Files\Apache Software Foundation\Apache2.2\bin>httpd.exe -k install -
n apache2
Installing the apache2 service
The apache2 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
httpd.exe: Could not reliably determine the server's fully qualified domain name
, using 192.168.1.212 for ServerName
解決這個(gè)問(wèn)題方法:把/conf/httpd.conf文件的#ServerName 前的#去掉,再執(zhí)行上面的操作。
再輸入net start apache2
之后我們看見(jiàn)了成功的信息
httpd: Could not reliably determine the server's fully qualified domain name
在windows下安裝好apache服務(wù)器后,重新啟動(dòng)后,回出現(xiàn)上面的錯(cuò)誤,只要把/conf/httpd.conf文件的#ServerName 前的#去掉就好了。
