
Ich habe ein Problem mit meiner Apache2.4-Konfiguration. Ich habe mehrere Dienste, die vom Apache bedient werden und über die ich erreichbar bin:
www.example.com/http-service/ -> Proxy-Pass-Konfiguration www.example.com/webservice2/ -> Proxy-Pass-Konfiguration www.example.com/service3/ -> Verzeichnis-Webseite www.example.com/websock/ -> Proxy-Pass-Konfiguration
Jetzt möchte ich eine weitere Seite bereitstellen unter: www.example.com/
aber wenn ich den Standort mit einer Proxy-Pass-Konfiguration erstellen möchte, werden die aktuellen Dienste nicht mehr bereitgestellt und alle Anfragen werden auf -> www.example.com umgeleitet
Gibt es eine Lösung, bei der alle Dienste verfügbar sind?
<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>
Viele Grüße Tingle
Antwort1
Nach einigem Lesen habe ich eine Lösung gefunden.
<LocationMatch "^(?!\/(service1|service2)\/?).*">
#Service config for / except for /service1 or service2
</LocationMatch>