Making Apache play through a proxy...

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Uncle Pete
Forum Members
Forum Members
Posts: 18
Joined: Wed May 09, 2007 9:44 am

Making Apache play through a proxy...

Post 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!
Last edited by Uncle Pete on Mon Dec 03, 2007 3:02 pm, edited 1 time in total.
Pierre M.

Re: Making Apache play through a proxy...

Post 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.
Uncle Pete
Forum Members
Forum Members
Posts: 18
Joined: Wed May 09, 2007 9:44 am

Re: Making Apache play through a proxy...

Post 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!
Pierre M.

Re: Making Apache play through a proxy...

Post 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.
Uncle Pete
Forum Members
Forum Members
Posts: 18
Joined: Wed May 09, 2007 9:44 am

Re: Making Apache play through a proxy...

Post 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
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Making Apache play through a proxy...

Post 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.
Pierre M.

Re: Making Apache play through a proxy...

Post 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
dbourke7
New Member
New Member
Posts: 3
Joined: Tue Nov 16, 2010 4:06 am

Re: Making Apache play through a proxy...

Post by dbourke7 »

have exacly the same problem, what can be done to allow cmsms to run behind a proxy server?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Making Apache play through a proxy...

Post by calguy1000 »

Nope... CMSMS still attempts to make connections directly. sorry.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “CMSMS Core”