显示第一个虚拟服务器的网站

我试图使用apache2虚拟主机添加一个新的域到我的服务器。 我有的主要网站是https://AAAA.net (这是SSL),我添加了一个新的域名是http://BBBB.net (非SSL现在,我只想让它工作第一)。

然而BBBB.net似乎显示AAAA.net内容,我想我已经正确地configuration了一切,以我所知。 两者都通过a2ensite启用。

在网站上可用:

AAAA.net.conf

 <VirtualHost AAAA.net:80> DocumentRoot "/home/www/AAAA.net/public_html" ServerName AAAA.net <Directory "/home/www/AAAA.net/public_html"> allow from all Options None Require all granted </Directory> ProxyPassMatch ^/(.+\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/home/www/AAAA.net/public_html/wiki/$1 RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] ProxyPassMatch ^/?w(/.*)?$ fcgi://127.0.0.1:9000/home/www/AAAA.net/public_html/wiki/index.php ProxyPassMatch ^/?$ fcgi://127.0.0.1:9000/home/www/AAAA.net/public_html/wiki/index.php <Directory "/home/www/AAAA.net/public_html/wiki/images"> # Ignore .htaccess files AllowOverride None # Serve HTML as plaintext, don't execute SHTML AddType text/plain .html .htm .shtml .php .phtml .php5 # Don't run arbitrary PHP code. php_admin_flag engine off # If you've other scripting languages, disable them too. </Directory> # BEGIN Expire headers <ifModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 year" </ifModule> # END Expire headers # BEGIN Cache-Control Headers <ifModule mod_headers.c> <filesMatch ".(ico|jpe?g|png|gif|swf)$"> Header set Cache-Control "max-age=2592000, public" </filesMatch> <filesMatch ".(css)$"> Header set Cache-Control "max-age=604800, public" </filesMatch> <filesMatch ".(js)$"> Header set Cache-Control "max-age=216000, private" </filesMatch> <filesMatch ".(x?html?|php)$"> Header set Cache-Control "max-age=600, private, must-revalidate" </filesMatch> </ifModule> # END Cache-Control Headers # BEGIN Turn ETags Off <ifModule mod_headers.c> Header unset ETag </ifModule> FileETag None # END Turn ETags Off # BEGIN Remove Last-Modified Header <ifModule mod_headers.c> Header unset Last-Modified </ifModule> # END Remove Last-Modified Header </VirtualHost> <VirtualHost AAAA.net:443> DocumentRoot "/home/www/AAAA.net/public_html" ServerName AAAA.net <Directory "/home/www/AAAA.net/public_html"> allow from all Options None Require all granted </Directory> ProxyPassMatch ^/(.+\.(hh|php)(/.*)?)$ fcgi://127.0.0.1:9000/home/www/AAAA.net/public_html/wiki/$1 RewriteEngine On ProxyPassMatch ^/?w(/.*)?$ fcgi://127.0.0.1:9000/home/www/AAAA.net/public_html/wiki/index.php ProxyPassMatch ^/?$ fcgi://127.0.0.1:9000/home/www/AAAA.net/public_html/wiki/index.php <Directory "/home/www/AAAA.net/public_html/wiki/images"> # Ignore .htaccess files AllowOverride None # Serve HTML as plaintext, don't execute SHTML AddType text/plain .html .htm .shtml .php .phtml .php5 # Don't run arbitrary PHP code. php_admin_flag engine off # If you've other scripting languages, disable them too. </Directory> SSLEngine on SSLCertificateFile /etc/ssl/AAAA/AAAA_net.crt SSLCertificateKeyFile /etc/ssl/AAAA/AAAA_net.key # BEGIN Expire headers <ifModule mod_expires.c> ExpiresActive On ExpiresDefault "access plus 1 year" </ifModule> # END Expire headers # BEGIN Cache-Control Headers <ifModule mod_headers.c> <filesMatch ".(ico|jpe?g|png|gif|swf)$"> Header set Cache-Control "max-age=2592000, public" </filesMatch> <filesMatch ".(css)$"> Header set Cache-Control "max-age=604800, public" </filesMatch> <filesMatch ".(js)$"> Header set Cache-Control "max-age=216000, private" </filesMatch> <filesMatch ".(x?html?|php)$"> Header set Cache-Control "max-age=600, private, must-revalidate" </filesMatch> </ifModule> # END Cache-Control Headers # BEGIN Turn ETags Off <ifModule mod_headers.c> Header unset ETag </ifModule> FileETag None # END Turn ETags Off # BEGIN Remove Last-Modified Header <ifModule mod_headers.c> Header unset Last-Modified </ifModule> # END Remove Last-Modified Header </VirtualHost> 

BBBB.net.conf

 <VirtualHost BBBB.net:80> DocumentRoot "/home/www/BBBB.net/public_html" ServerName BBBB.net ServerAlias BBBB.net ServerAlias www.BBBB.net <Directory "/home/www/BBBB.net/public_html"> allow from all Options None Require all granted </Directory> </VirtualHost> 

有没有我不正确的做法? 谢谢。