例外のある Apache 2.4 の nasted ロケーション

例外のある Apache 2.4 の nasted ロケーション

apache2.4 の設定に問題があります。apache によって提供される複数のサービスが、次の方法でアクセス可能です。

www.example.com/http-service/ -> プロキシ パス設定 www.example.com/webservice2/ -> プロキシ パス設定 www.example.com/service3/ -> ディレクトリ ウェブページ www.example.com/websock/ -> プロキシ パス設定

ここで別のページを www.example.com/ に表示したいとします。

しかし、プロキシパス構成で場所を作成しようとすると、現在のサービスは提供されなくなり、すべてのリクエストが -> www.example.com にリダイレクトされます。

すべてのサービスが利用できるソリューションはありますか?

<VirtualHost *:443>
ServerName  
ServerAdmin webmaster@localhost
DocumentRoot /var/www/

SSLProxyEngine on
SSLProxyVerify none 
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLCertificateFile    /etc/ssl/certs/www-example-com.pem
SSLCertificateKeyFile /etc/ssl/private/www-example-com.key
SSLCertificateChainFile /etc/ssl/certs/www-example-com.chain
<Directory "/converee/">
        Options FollowSymLinks
        AllowOverride None
</Directory>

<Location /http-service>
   Require all granted
   AllowOverride None
   ProxyPass https://localhost:5200/http-service/
   ProxyPassReverse https://localhost:5200/http-service/
</Location>
ProxyPass /webservice2 https://127.0.0.1:6000/
ProxyPass /websock wss://127.0.0.1:6000/websock retry=3
ProxyPassReverse /webservice2 https://127.0.0.1:6000/
ProxyPassReverse /websock wss://127.0.0.1:6000/websock retry=3 
RedirectMatch permanent /webservice2$ /webservice2/

<Location />
   Allow from all
   AllowOverride None
   ProxyPass http://localhost:3030/
   ProxyPassReverse http://localhost:3030/
</Location>

<Directory "/var/www/service3">
     Options Indexes FollowSymLinks 
     MultiViews  
     AllowOverride All
     Order allow,deny
</Directory>     

ティングルより

答え1

いくつか読んだ後、解決策を見つけました。

<LocationMatch "^(?!\/(service1|service2)\/?).*">
  #Service config for / except for /service1 or service2 
</LocationMatch>

関連情報