Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: apache behind http proxy |
|
Author |
|
danny2001k
Joined: 12 Oct 2012 Posts: 3
|
Posted: Fri 12 Oct '12 14:02 Post subject: apache behind http proxy |
|
|
Hello,
I have a issue and I think some apache configuration would help me.
My problem: I have wamp installed on a pc. That pc can connect to the internet via a http proxy (ISA). So in my browser for ex I have to enter proxy IP and port.
My problem is that any app I install under wamp, can't access the internet. I think I have to enter my proxy ip and port is some config file.
Hope you understand my explanation.
<internet>---<domain network <ISA server> <pc with apache> <other pc's on the network >
Ty,
Danny |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 15 Oct '12 22:53 Post subject: |
|
|
You need to let the incomming traffic pass port 80 on the ISA server to the port 80 on the pc where apache is running (forwarding) |
|
Back to top |
|
danny2001k
Joined: 12 Oct 2012 Posts: 3
|
Posted: Thu 18 Oct '12 15:43 Post subject: |
|
|
I don't have access to the ISA server. I was given the ip and port to add to the browser settings to access the internet.
Ex: In firefox I enter them under network, http proxy.
Ip(192.168.1.120, port 8080). Without this settings I cant browse the internet.
Do I need to add this settings somewhere in the apache settings so the apps that run under it can access the internet?
Ty, Danny |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 18 Oct '12 20:33 Post subject: |
|
|
Sorry, I got a a bit wrong in the first time. I thought other from the internet should access apache. Since it is your apps that shall access the internet you can do somthing in your apps.
If it is php with curl for example you can configure there an proxy.
Code: |
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.foo.bar');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
curl_setopt($ch, CURLOPT_PROXY, '192.168.1.120:8080');
curl_setopt($ch, CURLOPT_PROXYPORT, 8080);
curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'DOMAIN\user:password');
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
curl_setopt($ch, CURLOPT_REFERER, 'http://myreferer.de');
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla...');
$result = curl_exec($ch);
$info = curl_getinfo($ch);
$error = curl_error($ch);
curl_close($ch);
|
I don't know the code of you apps, but is has to be done there, not in apache. Sorry for getting is wrong in the first place. |
|
Back to top |
|
danny2001k
Joined: 12 Oct 2012 Posts: 3
|
Posted: Mon 22 Oct '12 10:47 Post subject: |
|
|
ok, I get it. ty.
One offtopic question: how do I add a username withe space, I'm sure that it doesnt work like this:
Code: | curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'DD11\John Smith:passw0rd'); |
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 22 Oct '12 11:18 Post subject: |
|
|
I never had to try that But I assume that the white space should work as is. |
|
Back to top |
|
|
|
|
|
|