I'm trying to set up an apache HTTP service as a forward proxy that can proxy some requests to another proxy server and other requests directly. I have a Virtual host configured like
<VirtualHost 10.1.1.3:9000>
ServerName 0.0.0.0
DocumentRoot "/var/www/html"
<Directory "/var/www/htm">
AllowOverride All
Options -Indexes +FollowSimLinks
Require all granted
</Directory>
ProxyRequests On
ProxyVia On
SSLProxyEngine On
ProxyPreserveHost On
ProxyTimeout 60
ProxyRemote "*" "http://otherproxy:8088"
<ProxyMatch "^https?:\/\/my.*\.internal.*">
ProxyPass "https://my.website.internal"
</ProxyMatch>
</VirtualHost>
However, whenever I try to route through the proxy I get an HTTP 503 error. It seems to be selecting the ProxyRemote directive
[internal-server]$ https_proxy=http://10.1.1.3:9000 curl -kLv https://my.website.internal
....
Received HTTP code 503 from proxy after CONNECT
[internal-server]$ https_proxy=http://10.1.1.3:9000 curl -kLv https://github.com
....
< HTTP/1.1 200 OK
....
<!doctype html> .....