I have a problem with my apache2.4 configuration. I have multiple services served by the apache reachable through:

www.example.com/http-service/ -> proxy pass config www.example.com/webservice2/ -> proxy pass config www.example.com/service3/ -> directory webpage www.example.com/websock/ -> proxy pass config

Now I want to serve another page on: www.example.com/

but when I want to create the location with a proxy pass config the current services are not served anymore an all the requests are redirected to the -> www.example.com

Is there a solution that all the services are available?

<VirtualHost *:443>
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

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

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

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

Regards Tingle

  • Okay I found a hint to my solution -> to work with MatchLocation – tingel2k Jun 16 '15 at 15:22

After some readings I found a solution.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.