2011-12-18 30 views
0

私のバーチャルホストの設定は次のようになります。私は、サーバー名に接続しようとするとlocalhostのは、作品名前付き仮想ホストが動作しないのはなぜですか?

Listen 80 
... 
DocumentRoot "/www/mysite" 
... 
<Directory "/www/mysite"> 
    Options Indexes FollowSymLinks 
    AllowOverride None 
    Order allow,deny 
    Allow from all 
</Directory> 
... 
<Files ~ "^\.ht"> 
    Order allow,deny 
    Deny from all 
</Files> 
... 
NameVirtualHost *:80 
... 
<VirtualHost *:80> 
    ServerAdmin [email protected] 
    ServerName theag.com 
    ServerAlias www.theag.com 
    DocumentRoot "/www/mysite" 
    ErrorLog logs/dummy-host.example.com-error_log 
    CustomLog logs/dummy-host.example.com-access_log common 
</VirtualHost> 

は、VirtualHostセクションで説明したように、私はサーバーを取得しtheag.com見つからない。 何が間違っていますか?またはそれを稼働させるために何をすべきですか?

p.s. ...は、間に設定行を示します。

回避策:テストの目的で、これは私がやっていることです:

私はちょうど
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 theag.com www.theag.com
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
からの/ etc/hosts、 を編集しました。
これは動作するようになります。あなたは今のところipアドレスとして127.0.0.1を使用します。

+0

ドメイン名を難読化していないと仮定すると、公開DNSゾーンには「www.theag.com」のアドレスレコードはありません。 – jamesallman

+0

「127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4」から「127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 theag.com www.theag.com」に/ etc/hostsを編集しました。私はそれが今働くべきだと思います。 – ThinkingMonkey

答えて

2

サーバーのIPアドレスを指すようにドメインのDNSを配置する必要があります。 theag.comが実際の名前である場合、現在はどのIPアドレスとも関連付けられていません(いずれもwww.theag.com)。あなたのネームサーバーを管理する人に話してください。

+0

私はそれがここで問題です。ドメインtheag.comのローカル解像度を設定できますか? – ThinkingMonkey

+0

「127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4」から「127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 theag.com www.theag.com」に/ etc/hostsを編集しました。私はそれが今働くべきだと思います。 – ThinkingMonkey

関連する問題