1

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>
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>     

Regards Tingle

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

After some readings I found a solution.

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