第一次发帖,但请帮忙。我已经搜索和重新配置了 6 天,并且已经失去了几束头发。
问题:我想在我的 ubuntu 服务器上安装 2 个以上的虚拟主机(1 个 ip)但是 - 只有第一个“按字母顺序”列出的启用站点的节目。000-默认 www.domain1.com www.domain2.com
单独他们都工作(如果我 a2dissite 为每个离开 1)
配置:UBUNTU 10.10 服务器 EC2 实例(不要为这部分拍摄我 - 希望这不是问题!) APACHE 2.2.16 DNS my.domain.com - 到我的公共 ec2 dns(这有效)
虚拟主机:
默认
<VirtualHost *:80>
DocumentRoot "/home/www/"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all
</Directory>
<Directory /home/www>
Options Indexes Multiviews FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
LogLevel debug
ErrorLog /home/www/logs/error.log
CustomLog /home/www/logs/access.log "combined"
</VirtualHost>
虚拟主机 1 - 域 1
<VirtualHost *:80>
ServerAdmin webmaster@domain1.com
ServerName domain1.com
ServerAlias domain1.com www.domain1.com
# Indexes + Directory Root.
DirectoryIndex index.php
DocumentRoot "/home/www/www.domain1.com/"
# Directory directive
<Directory "/home/www/www.domain1.com">
Options Indexes Multiviews FollowSymLinks
AllowOverride none
Order allow,deny
Allow from all
</Directory>
# CGI Directory
ScriptAlias /cgi-bin/ /home/www/www.domain1.com/cgi-bin
<Location /cgi-bin>
Options +ExecCGI
</Location>
# Logfiles
LogLevel debug
ErrorLog "/home/www/www.domain1.com/logs/error.log"
CustomLog "/home/www/www.domain1.com/logs/access.log" combined
</VirtualHost>
我在另一个具有不同域名的文档根目录中也有 domain2 的上述内容
符号链接到位:我的 apache2ctl -St 显示以下 - VirtualHost 配置:
*:80 is a NameVirtualHost
default server (/etc/apache2/sites-enabled/000-default:4)
port 80 namevhost (/etc/apache2/sites-enabled/000-default:4)
port 80 namevhost domain1.com (/etc/apache2/sites-enabled/www.domain1.com:4)
port 80 namevhost www.domain2.com (/etc/apache2/sites-enabled/www.domain2.com:4)
Syntax OK
我的 ports.conf: NameVirtualHost *:80 Listen 80
<IfModule mod_ssl.c>
NameVirtualHost *.443
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
我的 apache2.conf 和 httpd.conf 没有从默认更改为空。
我已经尝试了以下(以及大约一百个其他):
[URL="http://ubuntu-tutorials.com/2008/01/09/setting-up-name-based-virtual-hosting/"][/URL] [URL="http://httpd.apache. org/docs/2.2/rewrite/vhosts.html"]http://httpd.apache.org/docs/2.2/rewrite/vhosts.html[/URL] [URL="http://ubuntuforums.org/archive/ index.php/t-1466665.html"]http://ubuntuforums.org/archive/index.php/t-1466665.html[/URL] [URL="http://flurdy.com/docs/ec2/ basics/index.html"]http://flurdy.com/docs/ec2/basics/index.html[/URL] [URL="http://www.webmasterworld.com/apache/3282118.htm"]http ://www.webmasterworld.com/apache/3282118.htm[/URL]
似乎我已经尝试了其他所有人都遇到的所有问题,但似乎没有任何东西可以解决我的问题。
可能性:
1)EC2
2)文件的权限-我将所有内容都更改为 apache2 用户“www-data”-没有骰子。
3)我是个笨蛋……希望如此,你们中的一个好心人指出我的问题。:)
很快聊天......我会在这里失去我的头发。
问候, 洛甘萨诺