*nix Thread, Apache2, Ubuntu and proxying in Technical; I have a site hosted internally which needs to connect to another, externally hosted, site and as such it must ...
6th June 2008, 11:56 AM #1
Apache2, Ubuntu and proxying
I have a site hosted internally which needs to connect to another, externally hosted, site and as such it must go via our proxy server.
I've not had to do this before, so don't know where I would set the proxy address to allow this. It isn't possible within the site itself, so it needs to be done for apache itself. Any ideas?
IDG Tech News
6th June 2008, 01:12 PM #2
Apache makes no connections externally itself (other than DNS lookups). What sort of site is it? Is it PHP/Perl/etc?
7th June 2008, 10:04 AM #3
- Rep Power
As Geoff says, Apache itself wouldn't be making connections for you.
What exactly are you trying to achieve, and in what language? If it's php, what function are you using to grab data from this other site, and what version of php?
7th June 2008, 11:15 AM #4
It's os-commerce. The currencies part of the system connects remotely to an exchange rate site to update the currency values of products. So it is a php site.
I didn't write the code, so I have no idea how it does it itself.
7th June 2008, 10:40 PM #5
- Rep Power
I believe some functions of php5 understand http_proxy - you could try setting http_proxy in either the environment for apache, or in httpd.conf ?
7th June 2008, 11:12 PM #6
If it uses fopen, I don't think php uses http_proxy for that. I had a similar issue with a local rss cache I wrote for a flex application I'm building for our digital signage.
You may find this useful:
This feature has been added to PHP 5.0.0
$context = stream_context_create(
$contents = file_get_contents('http://www.somesite.com/pat/to/file',
EDIT: Instead of poking around in oscommerce - you could write a php proxy script using the above and redirect oscommerce to check the proxy url?
Last edited by kesomir; 7th June 2008 at 11:14 PM.
Last Post: 4th June 2008, 12:26 PM
Last Post: 5th December 2007, 02:15 PM
By jasonyates in forum How do you do....it?
Last Post: 6th November 2007, 11:03 AM
By Joedetic in forum Wireless Networks
Last Post: 6th August 2007, 12:56 PM
By maniac in forum Web Development
Last Post: 5th April 2007, 12:04 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread