Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/276.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Apache向备用域显示默认页面_Php_Apache_Mod Rewrite_Vhosts - Fatal编程技术网

Php Apache向备用域显示默认页面

Php Apache向备用域显示默认页面,php,apache,mod-rewrite,vhosts,Php,Apache,Mod Rewrite,Vhosts,我有两个不同的域,它们应该指向相同的index.php文件: 1) diegodeoxossi.com.br 2) lumelivros.com.br 两者的所有DNS设置都相同。Apache默认vhost已禁用,并且两个域具有相同的vhost配置,如下所示: 1) diegodeoxossi.com.br <VirtualHost *:80> ServerName diegodeoxossi.com.br ServerAlias *.diegodeoxossi.com.br Doc

我有两个不同的域,它们应该指向相同的index.php文件: 1) diegodeoxossi.com.br 2) lumelivros.com.br

两者的所有DNS设置都相同。Apache默认vhost已禁用,并且两个域具有相同的vhost配置,如下所示:

1) diegodeoxossi.com.br

<VirtualHost *:80>
ServerName diegodeoxossi.com.br
ServerAlias *.diegodeoxossi.com.br
DocumentRoot /var/www/html
AllowEncodedSlashes On

<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>

RewriteEngine on
SSLProxyEngine On

</VirtualHost>

问题是:域1工作得很好;域#2通过此规则并保持显示apache的默认页面。有人知道如何修复它吗?

如果你想显示同一个网站,为什么不在第二个域名中使用
ServerAlias
?实际上,在我可以让两个域正确显示相同的基本站点后,应用程序将控制不同的内容。。。在我的问题中,“显示完全相同的网站”实际上意味着“指向相同的index.php文件”(我会编辑它)
<VirtualHost *:80>
ServerName lumelivros.com
ServerAlias *.lumelivros.com
DocumentRoot /var/www/html
AllowEncodedSlashes On

<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>

RewriteEngine on
SSLProxyEngine On

</VirtualHost>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*         site/index.php?APPLR_friendlyURL=1 [L,QSA]