JOOMLA behind SQUID in reverse proxy

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
diniz21
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Oct 21, 2008 12:47 pm

JOOMLA behind SQUID in reverse proxy

Postby diniz21 » Tue Oct 21, 2008 1:16 pm

hello,
i have installed a JOOMLA site behind SQUID in reverse proxy but i have a problem with access to URLs. SQUID return to the navigator a URL like http://site.comhttp/ or http://site.comhttp//site.com/. :-\

When stop SQUID and i do a direct access to my joomla site, it's OK.

What's the solution ??

diniz21
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Oct 21, 2008 12:47 pm

Re: JOOMLA behind SQUID in reverse proxy

Postby diniz21 » Tue Oct 21, 2008 2:18 pm

Yes !!! i find !!!
I have modified uri.php


Code: Select all

if (!empty ($_SERVER['PHP_SELF']) && !empty ($_SERVER['REQUEST_URI'])) {
             /*
              * To build the entire URI we need to prepend the protocol, and the http host
              * to the URI string.
             */
             $theURI = 'http' . $https . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
}
else ....


by

Code: Select all

if (!empty ($_SERVER['PHP_SELF']) && !empty ($_SERVER['REQUEST_URI'])) {
             /*
              * To build the entire URI we need to prepend the protocol, and the http host
              * to the URI string.
             */
             $theURI = 'http' . $https . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
}
else ....

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4785
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: JOOMLA behind SQUID in reverse proxy

Postby ianmac » Tue Oct 21, 2008 2:27 pm

diniz21 wrote:Yes !!! i find !!!
I have modified uri.php


Code: Select all

if (!empty ($_SERVER['PHP_SELF']) && !empty ($_SERVER['REQUEST_URI'])) {
             /*
              * To build the entire URI we need to prepend the protocol, and the http host
              * to the URI string.
             */
             $theURI = 'http' . $https . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
}
else ....


by

Code: Select all

if (!empty ($_SERVER['PHP_SELF']) && !empty ($_SERVER['REQUEST_URI'])) {
             /*
              * To build the entire URI we need to prepend the protocol, and the http host
              * to the URI string.
             */
             $theURI = 'http' . $https . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
}
else ....



It's much better to specify the live_site parameter in your configuration.php file. This has to be done manually in the file itself - it cannot be access from the Global Configuration. This will force a value for the URL.

Ian

diniz21
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Tue Oct 21, 2008 12:47 pm

Re: JOOMLA behind SQUID in reverse proxy

Postby diniz21 » Wed Oct 22, 2008 7:07 am

Thanks ianmac. Yes it's much better .... :-[

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4785
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: JOOMLA behind SQUID in reverse proxy

Postby ianmac » Wed Oct 22, 2008 1:28 pm

diniz21 wrote:Thanks ianmac. Yes it's much better .... :-[


Glad I could help - no need to be embarrassed - you weren't there when we were implementing it :)

Ian


Return to “Joomla! 1.5 Coding”

Who is online

Users browsing this forum: No registered users and 7 guests