我在Apache的“sites-available”文件夹中为我的Django应用程序创建了一个新的虚拟主机:
NameVirtualHost 74.181.105.228:80
<VirtualHost 74.181.105.228:80>
ServerAdmin admin@mydomain.com
ServerName mydomain.com
# Run the SLMCS Django application.
WSGIScriptAlias / /home/david/djangosites/mydomain/wsgi.py
WSGIScriptReloading On
Alias /static/ /home/david/staticFiles/
<Directory /home/david/djangosites/mydomain>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
</Virtualhost>
用“sudo apachectl restart”重新启动Apache后,网站http://mydomain.com正常运行。但是,Apache会输出此警告。
apache2: Could not reliably determine the server's fully qualified domain name,
using 74.181.105.228 for ServerName
这是什么意思?我在我的Virtualhost中指定了ServerName指令,对吧?
答案 0 :(得分:2)
您的服务器没有ServerName
。您设置了一个,但仅限于您的VirtualHost,而不是服务器本身。