1. 程式人生 > >解決httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0

解決httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
解決辦法非常簡單:
[email protected]:/etc/apache2# vi apache2.conf 
# Include the virtual host configurations:
ServerName  localhost:80
Include sites-enabled/
[email protected]:/etc/apache2# service apache2 restart

[ ok ] Restarting web server: apache2 ... waiting ..

#vim /web/apache/conf/httpd.conf (在這裡/web/apahce是我安裝apache的目錄,你預設安裝的話應該是/usr/local/apache2/icons)
找到#ServerName www.example.com:80   把#去掉,再重啟apache即可沒事了。

現象:
bogon:~/webserver/httpd-2.0.59 # /usr/local/apache2/bin/apachectl start
httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
httpd (pid 20183) already running
這個問題應該是沒有在 /etc/httpd/conf/httpd.conf 中設定 ServerName  


vi /usr/local/apache2/conf/httpd.conf
最簡單的,修改httpd.conf檔案,增加:
ServerName www.example.com:80
我的改為:

ServerName www.example.com:80

再次啟動就正常了!
------------------------------------------------------------------------------------------------------------------------------------------------------------
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

解決方案:
用記事本開啟 httpd.conf
將裡面的 #ServerName localhost:80 註釋去掉即可。
再執行 httpd
然後可以通過瀏覽器訪問 http://localhost:80 ,如果頁面顯示 “It works!” ,即表示apache已安裝並啟動成功。
++++++++++++++++++++++++++++++++++++++++++++
using localhost.localdomain for ServerName  說不能確認伺服器完全確認域名 localhost.localdoman  這個問題怎麼解決
最佳答案: 
vi /etc/httpd/conf/httpd.conf   加入一句  ServerName  localhost:80
解決步驟:
為了解決這個問題,你需要編輯下面這個httpd.conf檔案,開啟它並根據如下操作進行編輯:
[c-sharp] view plaincopy
sudo gedit /etc/apache2/httpd.conf  
預設的httpd.conf是個空檔案,現在向裡面加入如下內容:
[c-sharp] view plaincopy
ServerName localhost  
儲存並退出。
------------------------------------------------------------------------------------------------------------------------------------------------------------

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
httpd (pid 7907) already running
修改:去掉註釋即可。
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName www.example.com:8080


解決方案:
進入apache的安裝目錄:
Windows : D:\Program Files\Apache Software Foundation\Apache2.2\conf
linux : /usr/local/apache/conf
用記事本開啟httpd.conf
將裡面的#ServerName localhost:80註釋去掉即可。
再執行httpd
然後可以通過瀏覽器訪問http://localhost:80,如果頁面顯示“It works!”,即表示apache已安裝並啟動成功。

版權所有。轉載時必須以連結形式註明作者和原始出處及本宣告!

http://www.justwinit.cn/post/3140/

相關推薦

解決httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName解決辦法非常簡單:[email protecte

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::1

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::1

解決apache啟動錯誤:Could not reliably determine the server's fully qualified domain name

原文地址:http://www.2cto.com/os/201201/117797.html 啟動apache遇到錯誤:httpd: Could not reliably determine the server's fully qualified domain name

linux Could not reliably determine the server's fully qualified domain name

今天在安裝httpd之後,搞了一下apache2.2和tomcat7的整合; 在重啟apache2.2的時候,出現了: [[email protected] conf]# service httpd restart 停止 httpd:

Apache啟動時報錯Could not reliably determine the server's fully qualified domain name

apache無法啟動,提示: 正在啟動 httpd:httpd: apr_sockaddr_info_get() failed for CentOS httpd: Could not reliab

AH00558: httpd.exe: Could not reliably determine the server's fully qualified do main name, using fe

Apache的配置檔案則是conf目錄下的httpd.conf檔案,將其開啟: 首先找到ServerName(約213行),將其設定為localhost:80,並將前面的井號刪除,雖然這一步如果不修改的話也可以正常執行,但啟動Apache服務時會有一條煩人的提示(AH

httpd: Could not reliably determine the server's fully

httpdStarting httpd: httpd: Could not reliably determine the server‘s fully qualified domain name, using 192.168.229.152 for ServerName(2)No such file or d

httpd: Could not reliably determine the server's fully qualified domain name

httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName 解決辦法非常簡單: #vim /web/apache/conf/h

解決apache啟動錯誤"httpd:Could not reliably determine

啟動apache遇到錯誤:httpd: Could not reliably determine the server's fully qualified domain name [[email protected] httpd-2.2.4]# /usr/l

Eclipse中啟動Tomcat時(MAVEN專案),報錯:Could not publish to the server. java.lang.IndexOutOfBoundsException的解決過程

Eclipse中啟動Tomcat時(MAVEN專案),報錯:Could not publish to the server. java.lang.IndexOutOfBoundsException,tomcat啟動失敗,   原因:該MAVEN專案下載的本地jar包存在下載失敗的情況 &nbs

tomcat 啟動報Could not publish to the server. Please assign JRE to the server解決方法

" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.startup.VersionLoggerListener" /> <!-- Security listener. Documentation at

maven+ssm啟動Tomcat報錯 Could not publish to the server. java.lang.IndexOutOfBoundsException 解決辦法

1找到你maven安裝目錄D:\studys\apache-maven-3.5.3-bin\apache-maven-3.5.3\conf找到settings.xml開啟2,新增這段程式碼<mirror>    <id>alimaven</id&

invalid LOC header 與 Could not publish to the server. java.lang.IndexOutOfBoundsException 錯誤處理

1. 專案eclipse 部署問題 Could not publish to the server. java.lang.IndexOutOfBoundsException 原因: pom.xml 依賴的jar包有錯誤,maven 下載jar時,檔案為下載文章

mysql報錯 MySQL server PID file could not be found The server quit without updating PID file (/var/l

執行mysql重啟命令突然報錯: 後面的/var/lib/mysql/192.168.1.139.pid給了我們提示 我們進入/var/lib/mysql資料夾  發現了一個好東西  192.168.1.139.err(不用想錯誤資訊肯定在這裡面) 檢視日

eclipse配置tomcat,讓java web專案執行起來! Tomcat v9.0 Could not publish to the server. java.lang.IndexOutOfBoundsException

做專案,搞開發。開發環境配置時第一步。只有環境搭好了,以後的事情才能順利進行! 這不需求來了,負一屏專案有新功能需要新增,臨時接手,要進行伺服器前端開發。這個專案是以前後臺java人員進行開發的。都是jsp頁面,那個叫心塞的啊,看的一臉不爽。但是,工作還得繼續,沒接觸過的,就得去趟趟,試試水。 把專案cl

tomcat啟動報錯Could not publish to the server. java.lang.NullPointerException

tomcat部署好後用了很久,突然啟動報錯: Could not publish to the server. java.lang.NullPointerException 解決方法: 在e

關於tomcat報錯Could not publish to the server

最近在學習相關課程的時候,啟動tomcat時,發現報錯Could not publish to the server. 然後把自己之前上傳的專案開啟以後再次啟動就可以了。 總結了原因: 啟動tomcat時 必須保證已經上傳發布到其中的專案要處於可訪問狀態,也就是要開啟專案

關於的解決Connections could not be acquired from the underlying database!的異常報錯

關於的解決Connections could not be acquired from the underlying database!的異常報錯 當然網上有各種解決辦法,一下是我複製貼上的 連線資料庫引數配置是否正確 檢視連線的url 使用者名稱 密碼是否正確 ,密碼

解決 Connections could not be acquired from the underlying database!

java.sql.SQLException: Connections could not be acquired from the underlying database! [See nested exception: java.sql.SQLException

解決:Could not parse response code.Server Reply: SSH-2.0-OpenSSH_5.3

解決:org.apache.commons.net.MalformedServerReplyException: Could not parse response code.Server Reply: SSH-2.0-OpenSSH_5.3 當使用org.apache.commons.net.f