Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

mod_proxy configuration issue

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


bsemene at cyanide-studio

Nov 25, 2009, 3:11 AM

Post #1 of 3 (373 views)
Permalink
mod_proxy configuration issue

Hi List,

I'm new to mod_proxy and I think my problem is really a newbie problem
but I didn't find the answer in the doc or Google.

I set up a forward proxy but I can reach only web pages located on this
server (any vhost of this server), I can't reach web servers on the
local network or the Internet.

I set up the simpliest configuration as possible for a forward proxy :

<VirtualHost *:80>
ServerAdmin admin [at] domain
ServerName proxy.domain.tld

ProxyRequests On
ProxyVia On

<Proxy *>
Order deny,allow
Deny from all
Allow from a.b.c.d x.y.z.a m.n.o
</Proxy>

ErrorLog /var/log/httpd-fproxy-error.log
LogLevel Info

LogFormat "%v %h %l %u %t \"%r\" %>s %b" proxy_common
CustomLog /var/log/httpd-fproxy-access.log proxy_common
</VirtualHost>

Apache is hosting others vhosts for repositories and a reverse proxy,
everything works fine there when I contact them directly.

If I try to reach "proxy.domain.tld" from a browser with this proxy
config, it works. I reach the default Apache page
(/usr/local/www/apache22/data/index.html).
If I try to reach another vhost on the same server, it works.
If I try to reach a web server on the local network it doesn't work,
error 503.
If I try to reach a web server on the Internet (Google) it doesn't work,
error 503.

For pages that works I have a correct message in access.log
For pages that doesn't work I don't have any message nor in
httpd-fproxy-error.log and httpd-fproxy-access.log

$apachectl -t is fine
$apachectl -S is fine
I can reach any webserver from the server with Lynx.
DNS are resolved through a local server, and resolutions are fine.
I have freshly installed nothing since mod_proxy was enabled for the
reverse proxy yet.

I review all the directives given in the basic example from the apache
doc. Everything seems fine

I'm using Apache/2.2.9 (FreeBSD) mod_ssl/2.2.9 OpenSSL/0.9.7e-p1 DAV/2
SVN/1.5.2 PHP/5.2.6 with Suhosin-Patch configured
into a FreeBSD jail from 7.2-RELEASE-p2

Any advice or idea will be helpful,
Thanks,

--
Bastien Semene
Administrateur Réseau & Système

admin [at] cyanide-studio
+33 (0)1 47 86 30 80

Cyanide S.A.
5, Boulevard des Bouvets
92000 Nanterre - FRANCE


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


Emmanuel.Bailleul at telindus

Nov 25, 2009, 3:42 AM

Post #2 of 3 (352 views)
Permalink
RE: mod_proxy configuration issue [In reply to]

> -----Message d'origine-----
> De : Bastien Semene [mailto:bsemene [at] cyanide-studio]
> Envoyé : mercredi 25 novembre 2009 12:12
> À : users [at] httpd
> Objet : [users [at] http] mod_proxy configuration issue
>
> Hi List,
>
> I'm new to mod_proxy and I think my problem is really a newbie problem
> but I didn't find the answer in the doc or Google.
>
> I set up a forward proxy but I can reach only web pages located on this
> server (any vhost of this server), I can't reach web servers on the
> local network or the Internet.
>
> I set up the simpliest configuration as possible for a forward proxy :
>
> <VirtualHost *:80>
> ServerAdmin admin [at] domain
> ServerName proxy.domain.tld
>
> ProxyRequests On
> ProxyVia On
>
> <Proxy *>
> Order deny,allow
> Deny from all
> Allow from a.b.c.d x.y.z.a m.n.o
> </Proxy>
>
> ErrorLog /var/log/httpd-fproxy-error.log
> LogLevel Info
>
> LogFormat "%v %h %l %u %t \"%r\" %>s %b" proxy_common
> CustomLog /var/log/httpd-fproxy-access.log proxy_common
> </VirtualHost>
>
> Apache is hosting others vhosts for repositories and a reverse proxy,
> everything works fine there when I contact them directly.
>
> If I try to reach "proxy.domain.tld" from a browser with this proxy
> config, it works. I reach the default Apache page
> (/usr/local/www/apache22/data/index.html).
> If I try to reach another vhost on the same server, it works.
> If I try to reach a web server on the local network it doesn't work,
> error 503.
> If I try to reach a web server on the Internet (Google) it doesn't work,
> error 503.
>
> For pages that works I have a correct message in access.log
> For pages that doesn't work I don't have any message nor in
> httpd-fproxy-error.log and httpd-fproxy-access.log
>
> $apachectl -t is fine
> $apachectl -S is fine
> I can reach any webserver from the server with Lynx.
> DNS are resolved through a local server, and resolutions are fine.
> I have freshly installed nothing since mod_proxy was enabled for the
> reverse proxy yet.
>
> I review all the directives given in the basic example from the apache
> doc. Everything seems fine
>
> I'm using Apache/2.2.9 (FreeBSD) mod_ssl/2.2.9 OpenSSL/0.9.7e-p1 DAV/2
> SVN/1.5.2 PHP/5.2.6 with Suhosin-Patch configured
> into a FreeBSD jail from 7.2-RELEASE-p2
>
> Any advice or idea will be helpful,
> Thanks,
>
> --
> Bastien Semene
> Administrateur Réseau & Système
>
> admin [at] cyanide-studio
> +33 (0)1 47 86 30 80
>
> Cyanide S.A.
> 5, Boulevard des Bouvets
> 92000 Nanterre - FRANCE
>
>

Hi,

Are you using NameVirtualHost and where in your config is the snippet you included located in the global conf file (i.e before all the others ?) ?
It is not clear to me how you can use a forward proxy defined as a name based vhost in your config file ... unless it's the default one (?).
It is either not clear to me whether you did your tests in "proxy mode", i.e. defining your Apache's proxy explicitly in your browser.

Regards.

Emmanuel


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


bsemene at cyanide-studio

Nov 25, 2009, 6:43 AM

Post #3 of 3 (349 views)
Permalink
Re: RE: mod_proxy configuration issue [In reply to]

The default vhost was the problem.
I renamed the vhost file so it is loaded first and it works like a charm
now.

Thanks a lot.

Emmanuel Bailleul a écrit :
>> -----Message d'origine-----
>> De : Bastien Semene [mailto:bsemene [at] cyanide-studio]
>> Envoyé : mercredi 25 novembre 2009 12:12
>> À : users [at] httpd
>> Objet : [users [at] http] mod_proxy configuration issue
>>
>> Hi List,
>>
>> I'm new to mod_proxy and I think my problem is really a newbie problem
>> but I didn't find the answer in the doc or Google.
>>
>> I set up a forward proxy but I can reach only web pages located on this
>> server (any vhost of this server), I can't reach web servers on the
>> local network or the Internet.
>>
>> I set up the simpliest configuration as possible for a forward proxy :
>>
>> <VirtualHost *:80>
>> ServerAdmin admin [at] domain
>> ServerName proxy.domain.tld
>>
>> ProxyRequests On
>> ProxyVia On
>>
>> <Proxy *>
>> Order deny,allow
>> Deny from all
>> Allow from a.b.c.d x.y.z.a m.n.o
>> </Proxy>
>>
>> ErrorLog /var/log/httpd-fproxy-error.log
>> LogLevel Info
>>
>> LogFormat "%v %h %l %u %t \"%r\" %>s %b" proxy_common
>> CustomLog /var/log/httpd-fproxy-access.log proxy_common
>> </VirtualHost>
>>
>> Apache is hosting others vhosts for repositories and a reverse proxy,
>> everything works fine there when I contact them directly.
>>
>> If I try to reach "proxy.domain.tld" from a browser with this proxy
>> config, it works. I reach the default Apache page
>> (/usr/local/www/apache22/data/index.html).
>> If I try to reach another vhost on the same server, it works.
>> If I try to reach a web server on the local network it doesn't work,
>> error 503.
>> If I try to reach a web server on the Internet (Google) it doesn't work,
>> error 503.
>>
>> For pages that works I have a correct message in access.log
>> For pages that doesn't work I don't have any message nor in
>> httpd-fproxy-error.log and httpd-fproxy-access.log
>>
>> $apachectl -t is fine
>> $apachectl -S is fine
>> I can reach any webserver from the server with Lynx.
>> DNS are resolved through a local server, and resolutions are fine.
>> I have freshly installed nothing since mod_proxy was enabled for the
>> reverse proxy yet.
>>
>> I review all the directives given in the basic example from the apache
>> doc. Everything seems fine
>>
>> I'm using Apache/2.2.9 (FreeBSD) mod_ssl/2.2.9 OpenSSL/0.9.7e-p1 DAV/2
>> SVN/1.5.2 PHP/5.2.6 with Suhosin-Patch configured
>> into a FreeBSD jail from 7.2-RELEASE-p2
>>
>> Any advice or idea will be helpful,
>> Thanks,
>>
>> --
>> Bastien Semene
>> Administrateur Réseau & Système
>>
>> admin [at] cyanide-studio
>> +33 (0)1 47 86 30 80
>>
>> Cyanide S.A.
>> 5, Boulevard des Bouvets
>> 92000 Nanterre - FRANCE
>>
>>
>>
>
> Hi,
>
> Are you using NameVirtualHost and where in your config is the snippet you included located in the global conf file (i.e before all the others ?) ?
> It is not clear to me how you can use a forward proxy defined as a name based vhost in your config file ... unless it's the default one (?).
> It is either not clear to me whether you did your tests in "proxy mode", i.e. defining your Apache's proxy explicitly in your browser.
>
> Regards.
>
> Emmanuel
>
>
>

--
Bastien Semene
Administrateur Réseau & Système

admin [at] cyanide-studio
+33 (0)1 47 86 30 80

Cyanide S.A.
5, Boulevard des Bouvets
92000 Nanterre - FRANCE

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.