Apache-2.2

無法訪問我的主域(“無法解析主機”)

  • July 20, 2012

我有一個域(bydorian.com),今天我試圖從www一開始就刪除它。

但是現在子域(www.bydorian.com)有效,但主域(bydorian.com)無效。

捲曲響應是:curl: (6) Couldn't resolve host 'bydorian.com'

這是我的區域文件的重要部分:

* 10800 IN A 46.105.178.101
dev 10800 IN A 46.105.178.101
www 10800 IN A 46.105.178.101

我的虛擬主機:

<VirtualHost *:80>
       ServerName bydorian.com
       DocumentRoot /var/www/www

       <Directory /var/www/www>
               Options Indexes FollowSymLinks MultiViews
               AllowOverride All
               Order allow,deny
               allow from all
       </Directory>

       ProxyRequests Off
       <Proxy *>
               Order allow,deny
               Allow from all
       </Proxy>
       ProxyPass /transmission http://localhost:9091/transmission
       ProxyPassReverse /transmission http://localhost:9091/transmission

       ErrorLog ${APACHE_LOG_DIR}/error.log

       # Possible values include: debug, info, notice, warn, error, crit,
       # alert, emerg.
       LogLevel warn

       CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

<VirtualHost *:80>
       DocumentRoot /var/www/dev
       ServerName dev.bydorian.com
</VirtualHost>

你需要一個簡單的

IN A 46.105.178.101

也行,因為

* IN A 46.105.178.101

只匹配子域。

引用自:https://serverfault.com/questions/409546