Page 1 of 1

Making Apache play through a proxy...

Posted: Mon Dec 03, 2007 9:26 am
by Uncle Pete
Greetings guys - this problem relates currently to ModuleManager and RSS, but I'm sure is more fundamental. I've got a WAMP installation running on a machine that gets its internet connection through a proxy server. Not ideal, but that's how it is.

CMSMS is working peachily, except when a script needs to fetch something from the Internet. I'm guessing that I need to tell my Apache installation that it needs to talk to a proxy server to route its requests, but I'm damned if I know how to do it. Searching for help on this will give me endless advice on how to set up my Apache as a caching proxy for other machines but that's not what I want to do...or is it?

If any Apache gurus (or even just a one-eyed man in the kingdom of the blind) can throw me a bone here I'd be very grateful!

Re: Making Apache play through a proxy...

Posted: Fri Dec 07, 2007 3:25 pm
by Pierre M.
Hello Uncle Pete,

I haven't understood very well your context, may be your are confusing http (forward/reverse) proxy and NAT and firewalling. This is not specific to CMSms. You should ask your network administrator.

I bet Google can show you several web pages with drawings answering your questions and networking issue.

Pierre M.

Re: Making Apache play through a proxy...

Posted: Sun Dec 09, 2007 2:51 pm
by Uncle Pete
Thanks Pierre, I appreciate your response very much.

Obviously it's not wholly appropriate to post an issue that isn't CMSMS related here, but I was sure that it was a problem that people installing the system must have encountered before so chanced my hand a little.

What I did do was go to an Apache specific forum and seek advice there. The guys there reckon that it's the PHP scripts that do the fetching and so my problem doesn't lie with Apache.

So here's a restatement of the problem.

Everything local works beautifully, but when a script tries to pull something from an external site it fails on connection. So when I try and pull down an RSS feed I get a failed connection error. When SOAP tries to do its thing to load the Module Manager I get a failed connection error. I'm guessing that this is because I'm stuck behind a proxy server and PHP doesn't know where to look. I've seen similar PHP scripts (I'm thinking immediately of Moodle) that prompt for proxy details on installation, which sort of confirms to me that that is where my problem lies.

Once again, I'm wide open to suggestions!

Re: Making Apache play through a proxy...

Posted: Tue Dec 11, 2007 7:06 pm
by Pierre M.
Pierre M. wrote: ... firewalling. ...You should ask your network administrator.
because "Everything local works beautifully". Tune your network, not CMSms.

Pierre M.

Re: Making Apache play through a proxy...

Posted: Wed Dec 19, 2007 12:03 pm
by Uncle Pete
I really do appreciate your help on this Pierre, but I can't help but think that that's a little bit of a short sighted response. Whilst running a PHP server behind a proxy server is probably unusual I'm sure it's not unique - particularly in large organisations. Magpie - the software that drives the RSS module - recognises this possibility and I've now since discovered that by altering the files in the snoopy.inc file that sits within the module files I can now get my RSS feeds to work.

It would be nice if the rest of CMSMS acknowledged that this situation exists as well and made provision for it, but I guess that's something for the future.

Cheers,

Pete

Re: Making Apache play through a proxy...

Posted: Wed Dec 19, 2007 1:28 pm
by Ted
Actually, I don't believe this is an apache issue.  I think it's totally related to PHP.  In PHP 5, they added the ability to set an http proxy for fopen and file_get_contents calls, but AFAIK, CMSMS isn't using any of this...  mostly because we had no idea it existed.

What exactly are you trying to fetch?  Something from module manager?  Or another module.

Reason being, in the short term you can probably implement the changes shown here easily enough and at least limp along until we can come up with a better solution.

My solution here would be to allow some kind of proxy stuff in the CMSMS config in 2.0 and have wrapper function for fopen() and file_get_contents() that always used the proxy if it was set.  I'll put that on the list of little tweaks, because I can see this being useful for other people as well, especially in test environments.

Re: Making Apache play through a proxy...

Posted: Wed Dec 19, 2007 5:57 pm
by Pierre M.
Hello again Uncle Pete,
Uncle Pete wrote: that's a little bit of a short sighted response.
yes, I'm sorry. It was a bad day.

Pierre

Re: Making Apache play through a proxy...

Posted: Tue Nov 16, 2010 4:12 am
by dbourke7
have exacly the same problem, what can be done to allow cmsms to run behind a proxy server?

Re: Making Apache play through a proxy...

Posted: Tue Nov 16, 2010 4:20 am
by calguy1000
Nope... CMSMS still attempts to make connections directly. sorry.