Using apache as proxy: "File does not exist" errors with external domains
Posted by: stewie (---.emea.ibm.com)
Date: August 07, 2013 04:54PM

Hi,

Sorry if this question is very basic, I am new to this and will appreciate your help.

I have installed WAMP and it works fine.

However, I need to use Apache as a proxy server.
I go into browser settings and switch to "Manual proxy configuration" with "localhost" and port "80".
Typing "localhost" in the browser works fine- it displays WAMP homepage.
But, the following problems are observed:

1. If I type an external domain name into the browser address bar, e.g. www.bbc.co.uk, I see the WAMP homepage (although the browser address bar still says "www.bbc.co.uk"winking smiley

2. If I type an external domain name with a path into the browser address bar, e.g. www.bbc.co.uk/news/in_pictures/, I get a "404 not found" error: "The requested URL /news/in_pictures/ was not found on this server."

Apache log says this:

"....[error] [client 127.0.0.1] File does not exist: C:/wamp/news/in_pictures/, referer: www.bbc.co.uk/news/in_pictures/".

So, it looks like any domains get automatically overwritten with the wamp installation directory path.


Any ideas why is this happening and how to resolve this?

Thank you

Options: ReplyQuote
Re: Using apache as proxy: "File does not exist" errors with external domains
Posted by: Otomatic (Moderator)
Date: August 07, 2013 07:25PM

Hi,

>I go into browser settings and switch to "Manual proxy configuration" with "localhost" and port "80".
This simply tells the browser that you want to USE a proxy. This does not configure Apache to create and manage a proxy.
It's not that simple!
It should at least tell Apache to load one or more "proxy module" (There are ten in total). Then configure Apache (httpd.conf and others) to use a proxy.
All this is beyond my skills.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Using apache as proxy: "File does not exist" errors with external domains
Posted by: stewie (---.emea.ibm.com)
Date: August 08, 2013 12:36PM

Well, when I install Apache out of the box, this works fine: I specify localhost as a proxy in my browser, and all requested are being routed via Apache just fine.

However, this does not work with WAMP installation of Apache out of the box, for some reason, as I described. Any ideas on how to make it work?

Options: ReplyQuote
Re: Using apache as proxy: "File does not exist" errors with external domains
Posted by: Otomatic (Moderator)
Date: August 08, 2013 07:01PM

Compare the two installations (httpd.conf)

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.