0
我试图建立我的Apache 2个虚拟主机:使用Apache虚拟主机
Listen 11.22.33.44:8080
<VirtualHost *>
ServerName servername.com/stable
DocumentRoot /home/deploy/producao/servername.com/current/public
<Directory /home/deploy/producao/servername.com/current/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
</Directory>
</VirtualHost>
<VirtualHost *>
ServerName servername.com/stable
DocumentRoot /home/deploy/teste/servername.com/current/public
<Directory /home/deploy/teste/servername.com/current/public>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
</Directory>
</VirtualHost>
但这一切是错误的。 我想要的是,当我键入servername.com/stable时,我得到一个文档根,当我使用servername.com/testing时,我得到另一个。
我tryed几件事情,但没有工作,像
<VirtualHost servername.com/stable>
<VirtualHost servername.com/testing>
,并使用
ServerName servername.com
ServerPath /stable
...
ServerName servername.com
ServerPath /testing
但这一切工作。