Proxying G2 .. config.php ?

petepdx

Joined: 2005-01-18
Posts: 5
Posted: Tue, 2005-01-18 00:26

Need to put G2 on server behind FW (Proxy)

I've scanned the discussion forums and have seen reference to making two URL in config.php into relative paths. But my
config.php does not contain any URLs

Please let me know what I need to do to run G2 behind a proxy server

TIA

-pdx

----

Gallery URL (optional):
Gallery version:just pulled down from site
Webserver (with version): Apache 2x
Datatabase (with version):
PHP version (eg 4.2.1): 4.3.3
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system:
Web browser/version:

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-01-18 00:50

can you post a link to your phpinfo that is served via the proxy? or explain the urls you would use from a browser vs the urls the internal webserver will see?

 
petepdx

Joined: 2005-01-18
Posts: 5
Posted: Tue, 2005-01-18 01:06

the public URI currently is gallery.petelancashire.com that goes to Apahce that is set up to proxy to l1gallery.pdxeng.com

l1gallery.pdxeng.com is the host where G2 resides.

If accessing from

http://l1gallery.pdxeng.com/main.php

All works.

What seems to be the issue is that the 'URL' have the server l1gallery.pdx..... in them. What I need if for G2 to replace that
URL with the public one.

What I need is what remote has

# HTTP proxy host
proxyHost=proxy.host.com

# HTTP proxy port
proxyPort=80

where, if set, the value of proxyHost replaces the localhosts FQN

I can attach a phpinfo() output if still interested

thanks

-pdx

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-01-18 01:16

let's try a hack first and see if it works before deciding on the right solution..

edit modules/core/classes/GalleryUrlGenerator.class and find the generateUrl() function. at the bottom of this you'll see "return $url;" at about line 630. just above this put: $url = preg_replace('{\|1gallery.pdxeng.com}', 'gallery.petelancashire.com', $url);
see if that works.

 
petepdx

Joined: 2005-01-18
Posts: 5
Posted: Tue, 2005-01-18 01:51

version: * @version $Revision: 1.44 $ $Date: 2004/11/23 11:51:45 $

had to add regex to two other places, there are three returns in the class.

doing a very quick test looks like ot works

oh the UR is L1 (ell-one) ... but got that ok :)

Find it interesting this has not come up before ...

-pdx

 
petepdx

Joined: 2005-01-18
Posts: 5
Posted: Tue, 2005-01-18 02:31

Looks good so far, doing lots of clicking admin functions to try to break

ahh .. found one, created a new user and group, logging in may have an issue, doint the login on the top/right did not take, but loggin in
from the top/left just under the Gallery logo, that worked

but once, logout gave me a crash, alas i didnt save it :(

may not be related at all

-pdx

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-01-18 04:16

Theoretically, G2 should build new urls that are the same as the ones that you entered into the browser in order to get to G2 in the first place. That requires your proxy to provide us with the right information. We've got code in there that handles most proxies, but it sounds like your proxy is different. If you can give us access to your phpinfo, that'll help us figure out how to work with your proxy. Thanks.

 
petepdx

Joined: 2005-01-18
Posts: 5
Posted: Tue, 2005-01-18 17:36
 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2005-01-19 02:17

What proxy are you using? From your phpinfo() output, there's nothing in there that says gallery.petelancashire.com so we have no way of knowing that you're doing this proxying. If you use one of the standard proxies (mod_proxy, squid, etc) it usually passes on the data that we need...