You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Pascal Brugier <pb...@easter-eggs.com> on 2003/01/13 21:09:28 UTC

[users@httpd] ProxyPass Logs and index

Hello everybody,

I'm new on the list and I hope that my bad English will not be
an problem ;-)

I've a network with 3 public domains:

- 1 for the firewall
- 1 for the dmz 
- 1 for the lan

- In the dmz is a bastion with Apache-ssl as ProxyPass:


LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so
LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so

NameVirtualHost BASTION:80

<VirtualHost BASTION:80>
RewriteEngine On
RewriteRule ^/$ http://10.0.0.67/%{HTTP_HOST} [P]
RewriteLogLevel 5
RewriteLog /var/log/apache/rewrite.log
CustomLog /var/log/apache/proxy-access.log full
ErrorLog /var/log/apache/proxy-error.log
</VirtualHost>


I use this RewriteRule because the domain of the lan is the same
of the dmz and i cant'do in an other way.

- In the Lan is server with Apache 

LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so

NameVirtualHost 10.0.0.67:80

<VirtualHost 10.0.0.67:80>
ServerAdmin me@here
RewriteEngine On
RewriteRule ^/(.*)\.easter-eggs\.fr$ /var/www/$1/index.html
RewriteLog /var/log/apache/rewrite.log
RewriteLogLevel 5
ErrorLog /var/log/apache/proxy.easter-eggs.fr-error.log
CustomLog /var/log/apache/proxy.easter-eggs.fr-access.log proxy
</VirtualHost>


My questions are:

1) Is there a solution to have in the server's logs the name or the
   address of the client as we can have it on the proxypass's logs

   I try to create an server environment variable but it doesn't do
   what I want perhaps I didn't do the good solution.

2) In the server RewriteRule I'm obliged to had index.html at
   the end because if I don't do this I obtain the directory
   with all the files/directories which are in and not the file
   index.hml.

   Of course this solution is not good because if I have
   something like index.php or index.htm it doesn't work.

   I try with and without / at the end of the URL or of the
   Rewrite but nothing work as I want and with the solution I
   use the browser doesn't see the redirection as it's good for
   the security we need.


I know, this first mail is very long, but I need help because I
began to think perhaps I don't use the good solution.

Thank you


Re: [users@httpd] ProxyPass Logs and index

Posted by Pascal Brugier <pb...@easter-eggs.com>.
Hello


I find 2 solutions:

1) for the index.html with RewriteRule and the bug i'll use
   RewriteRule ^/(.*)\.easter-eggs\.fr$ /var/www/$1/index.html
   and make a simlink index.html -> index.something, this is
   possible in the website I've to admin.

2) for the logs I use a dirty solution, but it works:

a) on the Apache proxypass
	
   RewriteRule ^/$http://10.0.0.67/%{HTTP_HOST}/%{REMOTE_ADDR} [P]
	
b) on the Apache server:

    LogFormat "%{REMOTE_CLIENT}e %l %u %t \"%r\" %>s %b\"%{Referer}i\" \
    \"%{User-Agent}i\" %T %v"proxy
    
    RewriteRule ^/(.*)\.easter-eggs\.fr/(.*)$/var/www/$1/index.html \
    [E=REMOTE_CLIENT:$2]

    CustomLog /var/log/apache/proxy.easter-eggs.fr-access.log \
    proxy
    
    And I have the REAL_REMOTE_ADDR in the log, it's a solution,
    but not a GOOD solution :-(


This give a question, isn't possible to pass an env variable
from the Apache proxypass to the Apache server, which give
information about the client(IP Browser ADDR ....) ?


Thank you

Pascal

On Tue, Jan 14, 2003 at 10:04:37AM +0100, Pascal Brugier wrote:
> On Mon, Jan 13, 2003 at 07:45:56PM -0500, Mike Cramer wrote:
> > Pascal Brugier wrote:
> > >2) In the server RewriteRule I'm obliged to had index.html at
> > >   the end because if I don't do this I obtain the directory
> > >   with all the files/directories which are in and not the file
> > >   index.hml.
> > >
> > >   Of course this solution is not good because if I have
> > >   something like index.php or index.htm it doesn't work.
> > >
> > >   I try with and without / at the end of the URL or of the
> > >   Rewrite but nothing work as I want and with the solution I
> > >   use the browser doesn't see the redirection as it's good for
> > >   the security we need.
> > 
> > The latest attachment to this bug fixes the problem, if you are willing 
> > to build apache from source.
> > 
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14648
> 
> Hello, I'll thank you for your answer.
> I'll try to find a solution to avoid this problem, cause I
> really need this feature.
> 
> Pascal
> 


Re: [users@httpd] ProxyPass Logs and index

Posted by Pascal Brugier <pb...@easter-eggs.com>.
On Mon, Jan 13, 2003 at 07:45:56PM -0500, Mike Cramer wrote:
> Pascal Brugier wrote:
> >2) In the server RewriteRule I'm obliged to had index.html at
> >   the end because if I don't do this I obtain the directory
> >   with all the files/directories which are in and not the file
> >   index.hml.
> >
> >   Of course this solution is not good because if I have
> >   something like index.php or index.htm it doesn't work.
> >
> >   I try with and without / at the end of the URL or of the
> >   Rewrite but nothing work as I want and with the solution I
> >   use the browser doesn't see the redirection as it's good for
> >   the security we need.
> 
> The latest attachment to this bug fixes the problem, if you are willing 
> to build apache from source.
> 
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14648

Hello, I'll thank you for your answer.
I'll try to find a solution to avoid this problem, cause I
really need this feature.

Pascal


Re: [users@httpd] ProxyPass Logs and index

Posted by Mike Cramer <cr...@webkist.com>.
Pascal Brugier wrote:
> 2) In the server RewriteRule I'm obliged to had index.html at
>    the end because if I don't do this I obtain the directory
>    with all the files/directories which are in and not the file
>    index.hml.
> 
>    Of course this solution is not good because if I have
>    something like index.php or index.htm it doesn't work.
> 
>    I try with and without / at the end of the URL or of the
>    Rewrite but nothing work as I want and with the solution I
>    use the browser doesn't see the redirection as it's good for
>    the security we need.

The latest attachment to this bug fixes the problem, if you are willing 
to build apache from source.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14648

-- 
Mike Cramer
http://www.webkist.com/


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] ProxyPass Logs and index

Posted by Pascal Brugier <pb...@easter-eggs.com>.
I'm back :-)

I forgot to tell you my apache version: 1.3.26

Pascal


On Mon, Jan 13, 2003 at 09:09:28PM +0100, Pascal Brugier wrote:
> Hello everybody,
> 
> I'm new on the list and I hope that my bad English will not be
> an problem ;-)
> 
> I've a network with 3 public domains:
> 
> - 1 for the firewall
> - 1 for the dmz 
> - 1 for the lan
> 
> - In the dmz is a bastion with Apache-ssl as ProxyPass:
> 
> 
> LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so
> LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so
> 
> NameVirtualHost BASTION:80
> 
> <VirtualHost BASTION:80>
> RewriteEngine On
> RewriteRule ^/$ http://10.0.0.67/%{HTTP_HOST} [P]
> RewriteLogLevel 5
> RewriteLog /var/log/apache/rewrite.log
> CustomLog /var/log/apache/proxy-access.log full
> ErrorLog /var/log/apache/proxy-error.log
> </VirtualHost>
> 
> 
> I use this RewriteRule because the domain of the lan is the same
> of the dmz and i cant'do in an other way.
> 
> - In the Lan is server with Apache 
> 
> LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so
> 
> NameVirtualHost 10.0.0.67:80
> 
> <VirtualHost 10.0.0.67:80>
> ServerAdmin me@here
> RewriteEngine On
> RewriteRule ^/(.*)\.easter-eggs\.fr$ /var/www/$1/index.html
> RewriteLog /var/log/apache/rewrite.log
> RewriteLogLevel 5
> ErrorLog /var/log/apache/proxy.easter-eggs.fr-error.log
> CustomLog /var/log/apache/proxy.easter-eggs.fr-access.log proxy
> </VirtualHost>
> 
> 
> My questions are:
> 
> 1) Is there a solution to have in the server's logs the name or the
>    address of the client as we can have it on the proxypass's logs
> 
>    I try to create an server environment variable but it doesn't do
>    what I want perhaps I didn't do the good solution.
> 
> 2) In the server RewriteRule I'm obliged to had index.html at
>    the end because if I don't do this I obtain the directory
>    with all the files/directories which are in and not the file
>    index.hml.
> 
>    Of course this solution is not good because if I have
>    something like index.php or index.htm it doesn't work.
> 
>    I try with and without / at the end of the URL or of the
>    Rewrite but nothing work as I want and with the solution I
>    use the browser doesn't see the redirection as it's good for
>    the security we need.
> 
> 
> I know, this first mail is very long, but I need help because I
> began to think perhaps I don't use the good solution.
> 
> Thank you
>