我有一个静态公共 IP,我在上面托管我的网站(Ubuntu Server 12.04)。我需要设置一个子域,但它不起作用,即使是 www。不管用。我从 GoDaddy 购买了域名并设置了正确的 NS
我将配置文件保存/etc/apache2/sites-available
在 domain.me 下,然后我a2ensite domain.me
重新加载并重新启动了 apache2,但仍然没有运气。
这是我的配置文件
<VirtualHost *:80>
ServerAdmin webmaster@domain.me
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 webmaster@domain.me
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'
和子域相同