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 と入力すると 1 つのドキュメント ルートが取得され、servername.com/testing を使用すると別のドキュメント ルートが取得されることです。
私はいくつかのことを試しましたが、どれもうまくいきませんでした
<VirtualHost servername.com/stable>
<VirtualHost servername.com/testing>
と使用
ServerName servername.com
ServerPath /stable
...
ServerName servername.com
ServerPath /testing
しかし、これはどれも機能しません。