apache proxypass without first segment

Viewed 14

I would like to proxy requests to a different server - but only for a given path.

I want all requests to path /foo be proxied to fcgi://192.168.1.1:9000/index.php
I got it working with these settings in apache httpd.conf

ProxyPass        /foo fcgi://192.168.1.1:9000/index.php
ProxyPassReverse /foo fcgi://192.168.1.1:9000/index.php

But it keeps the /foo path. So in the other server the requests are sent to:

10.40.0.254 -  16/Sep/2022:15:49:27 +0000 "GET /foo/anotherbar" 404
10.40.0.254 -  16/Sep/2022:15:51:40 +0000 "GET /foo" 404
10.40.0.254 -  16/Sep/2022:15:51:43 +0000 "GET /foo" 404

How can I remove the first "segment" from the path?

0 Answers
Related