Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've been struggling with this for a while, but please forgive my ignorance, I'm fairly new to Apache 2.2 configuration....

Basically I am trying to somehow get a local path to forward/rewrite/proxy another external address, so that that external address appears as if it's on the same domain as my local address.

If this sounds like I'm trying to do anything untoward, I'm not! I'm trying to get my local development environment to use one of our services deployed in the test environment to act as if I'd deployed it locally through the help of Apache.

What I've tried:

The redirect:

This works, but it doesn't have the desired result - the domain is unsurprisingly different:

RedirectMatch ^/projectA/(.+) https://test.projects.com/projectA/$1

The ProxyPass:

Keeps resulting in 503 errors (I am on Windows 7, wonder if this a firewall issue? Don't want to go fiddling with something I didn't setup until I know what I am doing...)

ProxyPreserveHost On
#SSLProxyEngine On
ProxyPass /projectA/ https://test.projects.com/projectA/
ProxyPassReverse /projectA/ https://test.projects.com/projectA/

Commented out SSLProxyEngine having tried it, also I have tried without HTTPS, instead using HTTP.

The RewriteRule:

I did also try rewriting the URL, it was a while ago now and have lost my configuration. It didn't seem to be picked up, no 503 errors just Apache trying to look for a 'projectA' directory under my htdocs.

The errors I see in my logs:

[Tue Jan 29 16:07:57 2013] [error] (OS 10060)A connection attempt failed because the connected party did not properly 
    respond after a period of time, or established connection failed because connected host has failed to respond.  
    : proxy: HTTP: attempt to connect to xxx.xxx.xxx.xxx:80 (test.projects.com) failed
[Tue Jan 29 16:07:57 2013] [error] ap_proxy_connect_backend disabling worker for (test.projects.com)
[Tue Jan 29 16:07:58 2013] [error] proxy: HTTP: disabled connection for (test.projects.com)
[Tue Jan 29 16:08:14 2013] [error] proxy: HTTP: disabled connection for (test.projects.com)
[Tue Jan 29 16:08:43 2013] [error] proxy: HTTP: disabled connection for (test.projects.com)

The question:

How can I achieve this? Is this possible?

share|improve this question
    
can you access the test.projects.com from the machine where you are setting the proxy? The complain in you log is about timeout from the remote machine and the error 503 means page unavailable. –  fboaventura Jan 30 '13 at 9:59
    
Yes, no problem accessing it through a browser. I have also tried it with something like bbc.co.uk/news and it also results in a 503. –  Ed . Jan 30 '13 at 10:03
    
Sorry for this question, but I got lost at some point. This machine where you are running apache and trying to configure the proxy is Linux or Windows based? –  fboaventura Jan 30 '13 at 20:42
    
It's Widows 7... –  Ed . Jan 31 '13 at 8:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.