apache2: ServerName에 127.0.1.1을 사용하여 서버의 정규화된 도메인 이름을 안정적으로 확인할 수 없습니다.

apache2: ServerName에 127.0.1.1을 사용하여 서버의 정규화된 도메인 이름을 안정적으로 확인할 수 없습니다.

Apache를 (다시)시작하면 이 경고가 계속 표시됩니다.

* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName [ OK ]

etc/hosts내 파일 의 내용은 다음과 같습니다 .

#127.0.0.1  hpdtp-ubuntu910
#testproject.localhost  localhost.localdomain   localhost
#127.0.1.1  hpdtp-ubuntu910

127.0.0.1   localhost
127.0.0.1   testproject.localhost
127.0.1.1   hpdtp-ubuntu910



# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

/etc/apache2/sites-enabled/000-default내 파일 의 내용은 다음과 같습니다 .

<VirtualHost *:80>
  ServerName testproject.localhost
  DocumentRoot "/home/morpheous/work/websites/testproject/web"
  DirectoryIndex index.php
  <Directory "/home/morpheous/work/websites/testproject/web">
    AllowOverride All
    Allow from All
  </Directory>

  Alias /sf /lib/vendor/symfony/symfony-1.3.2/data/web/sf
  <Directory "/lib/vendor/symfony/symfony-1.3.2/data/web/sf">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>

으로 이동하면 http://testproject.localhost빈 페이지가 나타납니다.

내가 뭘 잘못하고 있는지 알아낼 수 있는 사람이 있나요?

답변1

기본적으로 Ubuntu는 서버 이름이 무엇인지 모르기 때문에 Apache 구성에서 ServerName을 지정하지 않습니다. IP 주소에 대한 역방향 조회를 시도하지만 아무것도 반환하지 않으므로 IP 주소를 IP 주소로 사용해야 합니다.서버 이름.

이 문제를 해결하려면 ServerName 지시어를 추가하세요.가상 호스트 외부- 예를 들어 /etc/apache2/httpd.conf기본 IP 주소(이 경우 127.0.1.1)에 대한 역방향 DNS 응답을 설정하거나 설정합니다.

무시해도 괜찮습니다.

답변2

빠른 해결 방법은 다음과 같습니다.

echo ServerName $HOSTNAME > /etc/apache2/conf.d/fqdn

답변3

해당 경고를 해결하는 또 다른 방법은 정규화된 도메인 이름 127.0.1.1/etc/hosts. DNS 서버의 모든 항목을 실제로 확인하는 fqdn일 필요도 없습니다.

127.0.1.1  hpdtp-ubuntu910.lan  hpdtp-ubuntu910

추가 .lan. 순서가 중요합니다. .lan주소가 다른 주소 앞에 오는 이 예에서와 같이 더 많은 수준의 이름을 먼저 지정해야 합니다 .

답변4

httpd.conf 설정이 ServerName작동하지 않았습니다. ServerName 127.0.0.1에서 설정해서 해결했습니다 /etc/apache2/conf.d/name.

저는 Ubuntu 12.10 Alpha3을 실행 중이며 ServerName두 지점 모두에서 정의했습니다.

원천:http://linuxconfig.net/manual-howto/error-solution-could-not-reliously-determine-the-servers-full-qualified-domain-name.html

관련 정보