2013-04-28 134 views
0

我有一個靜態的公共IP,我正在託管我的網站(Ubuntu Server 12.04)。我需要建立一個子域,但它不工作,即使www。不管用。我買了GoDaddy的域名和我樹立正確​​的NSApache2 VirtualHost子域名無效?

/etc/apache2/sites-available保存在配置文件下domain.me然後我做了a2ensite domain.me並重新加載和重新啓動的Apache2,但仍沒有運氣。

這是我的配置文件

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    ServerName domain.me 
    ServerAlias www.domain.me 
    DocumentRoot /var/www 
    LogLevel warn 
    ErrorLog /var/log/apache2/error.log 
    CustomLog /var/log/apache2/access.log combined 
</VirtualHost> 

<VirtualHost *:80> 
    ServerAdmin [email protected] 
    ServerName me.subdomain.me 
    ServerAlias www.me.subdomain.me 
    DocumentRoot /var/www/subdomain 
</VirtualHost> 

curl http://domain.me輸出索引文件,curl http://www.domain.me輸出curl: (6) Couldn't resolve host 'www.domain.me'和同爲子域

回答

1

我設法解決它,而對於那些你們誰是有同樣的問題,請確保您設置了A記錄