一台机器2个域名该怎么设置?

主机没设域名。就在apache里做的2个虚拟主机
结果
引用:
debian:~# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)...apache2: Could not reliably determine the server's fully qualified domain name, using 194.168.0.9 for ServerName
[Wed Dec 27 23:07:42 2006] [warn] NameVirtualHost *:0 has no VirtualHosts
apache2: Could not reliably determine the server's fully qualified domain name, using 194.168.0.9 for ServerName
[Wed Dec 27 23:07:52 2006] [warn] NameVirtualHost *:0 has no VirtualHosts
怎么去掉这玩意?
感情一个人调戏apache呀

虚拟主机名称设置为
NameVirtualHost *:80

配置虚拟机用<VirtualHost *:80>开头
引用:
<VirtualHost *>
ServerAdmin master@111.org
ServerName www.111.org
ServerAlias 111.org

# Indexes + Directory Root
DirectoryIndex index.html index.htm index.php
DocumentRoot /srv/111.org/www/

# CGI Directory
ScriptAlias /cgi-bin/ /srv/111.org/cgi-bin/
<Location /cgi-bin>
Options +ExecCGI
</Location>

# Logfiles
ErrorLog /srv/111.org/logs/error.log
CustomLog /srv/111.org/logs/access.log combined
</VirtualHost>
引用:
<VirtualHost *>
ServerAdmin master@222.org
ServerName www.222.org
ServerAlias 222.org

# Indexes + Directory Root
DirectoryIndex index.html index.htm index.php
DocumentRoot /srv/222.org/www/

# CGI Directory
ScriptAlias /cgi-bin/ /srv/222.org/cgi-bin/
<Location /cgi-bin>
Options +ExecCGI
</Location>

# Logfiles
ErrorLog /srv/222.org/logs/error.log
CustomLog /srv/222.org/logs/access.log combined
</VirtualHost>
不知道哪里错了
最好加上80
[code:1]<VirtualHost *>
ServerAdmin master@111.org
ServerName www.111.org
ServerAlias 111.org

# Indexes + Directory Root
DirectoryIndex index.html index.htm index.php
DocumentRoot /srv/111.org/www/

# CGI Directory
ScriptAlias /cgi-bin/ /srv/111.org/cgi-bin/
<Location /cgi-bin>
Options +ExecCGI
</Location>

# Logfiles
ErrorLog /srv/111.org/logs/error.log
CustomLog /srv/111.org/logs/access.log combined
</VirtualHost> [/code:1]


这个就对 没有问题的








----------------------------------------
沈阳网站制作
你搜索下 基于主机头的 设置
N个域名都指到一个服务器上。
WIN下的我十分熟悉。
做过好多。