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:
Posts: 8601
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?
Posts: 5
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
Posts: 8601
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.
Posts: 5
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
Posts: 5
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
Posts: 7994
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.
Posts: 5
phpinfo at http://gallery.petelancashire.com/p1.php
Posts: 7994
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...