RE: [EMAIL PROTECTED] RewriteMap and sending more then 1 var

2005-08-18 Thread Axel-Stéphane SMORGRAV
Just one thing: why do you set the Content-Type [T] of a redirect [R]?? 

-ascs

-Original Message-
From: Tony VanScoy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 17, 2005 10:06 PM
To: users@httpd.apache.org
Subject: Re: [EMAIL PROTECTED] RewriteMap and sending more then 1 var

 Have you tried it?  What happened?

It worked after a few modifications

 Your idea is basically fine, except you should pick a character other 
 than
 |, because that character is special in a rewritemap (used to
 designate a default value).  (Perhaps it doesn't matter if it is in 
 quotes; I've never tried this myself.)

The quotes are passed along with the values so I didn't use them.
Here's what works

RewriteRule ^/getpdf\.php$
/pdf/${pdfFile:%1_%{HTTP_REFERER}_%{REMOTE_HOST}}?
[R,L,T=application/pdf]

 But you worry me a little when you talk about all the stuff you are 
 doing in your RewriteMap.  These programs should be extremly simple 
 because they run as root, and they are a choke point in that only one 
 request at a time can be processed through the RewriteMap.

My mapping program only makes two database queries, one to get the filename, 
and a second query to log the download. By default i have it sending back 
NULL\n. That value only gets changed if both queries execute without error. 
I'm using @ to prevent any error output.

Thanks for your help.

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] Request jsp pages from server and store them on disk

2005-08-18 Thread Erik Labree
Hi there,

I'm currently working on a project where we use Apache webserver with tomcat. We
have a client app which does requests to the webserver and the client gets the
response back from apache this is working great. Now we want the client to also
work in a offline mode where there won't and can't be a webserver to talk to. To
do that we want to store the pages on the localdisk.
To generate those local file we need to have a tool/script that looks at the
directory structure of the webapplication and does requests to the pages it can
see and save each page as plain text in the same directory structure as the
webapp to the file system.
Are there already tools that do this or otherwise any input on how to do this
would be greatly appriciated. 

Note that the files will be placed on a cd and that generating the pages doesn't
happen in a user environment but in our build process so it doesn't have to be
the nicest looking app available as long as it does the job.

Thanks,

Erik Labree


-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] mod_proxy + PHP as an output filter not working

2005-08-18 Thread Nick Kew

R Mills wrote:

Kind of an interesting problem:
I am using mod_proxy to reverse proxy a site.  In addition I am trying to
use PHP as an output filter to do session tracking on the proxy server.
PHP by itself as an output filter works fine.  But when it is combined with
mod_proxy, it does not appear to be called.


I've steered well clear of PHP for some time, so anything I say here
may be ill-informed nonsense.  But my understanding is that PHP doesn't
really work as a filter.


Anyone have any idea why, and is there anything I can tweak to get it to
work?


I don't know, but I might be able to suggest alternatives.  For example,
mod_publisher will give you auto_prepend_file and do a better job than
PHP.


VirtualHost *
## it works here - the contents of page_prepend.inc are processed with each
request
## note: not using mod_proxy, no proxying for this vhost
##
ServerName search.example.com
DocumentRoot /etc/apache/htdocs

php_value include_path .:/etc/apache/phpmods
php_value auto_prepend_file /etc/apache/page_prepend.inc
SetOutputFilter PHP
SetInputFilter PHP
/VirtualHost


Indeed, that looks like evidence of it working in a filter (assuming
there are no messages to the contrary in your error log).  But could
it really be faking it?  The difference in a proxy - or with local
contents from another dynamic source - is that it's much harder to
'fake it'.

Another possibility is that PHP's abuse of Content-Type (originally
introduced by Apache but fixed since 199?) is screwing you up.
You'd have to ask the php folks about a workaround.

--
Nick Kew


-
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: [EMAIL PROTECTED]
 from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] RewriteMap and sending more then 1 var

2005-08-18 Thread Tony VanScoy
On 8/18/05, Axel-Stéphane  SMORGRAV
[EMAIL PROTECTED] wrote:
 A redirection (HTTP 302 or friends) does not return any contents. It merely 
 directs the browser to request another URL which will hopefully return the 
 PDF document. That response should contain the header Content-Type: 
 application/pdf - not the redirect. Setting the header in a redirect will 
 have no effect on the response serving the PDF file.
 
 It is your php program that should set the Content-Type header. Look at other 
 postings on this list for the syntax.

That is actually what started this mess. If I try and use PHP to set
the headers, then the older IE browsers will not listen to the header
where I set the filename. I needed to redirect to the actual filename,
while still logging the proper fileId.

 As an aside, the [L] ( as in [R,L] ) is not necessary either since if the 
 rewrite rule condition triggers, the redirect will be immediate and no more 
 rewrite rules will be evaluated.

Like I said, im new. It's good to know, and I'll modify my config
accordingly. Thanks a bunch.

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] Help!!! Problem with cronolog 1.6.1 and apache 2.0.47 on windows 2000

2005-08-18 Thread Michael Lu
Hi,

We use cronolog to rotate the apache logs.  It causes some problems so I
wondering if anybody know the issues and how to solve them.

1. There are 12 cronolog processes running all the time in the background.
We only rotate 6 apache logs.  And I thought cronolog will only be invoked
when there is a log request.

2. The file handles for logs from previous days are not released.  So we
cannot delete the old logs.

3. Our apache just crashed last night and there is an error dialog says The
application failed to initialize properly(0xc42). Click ok to terminate
the application.

The following are lines in httpd.conf for log rotation.

#for access and error logs
CustomLog |D:/apache/Apache/bin/cronolog.exe
logs/access/access.%Y-%m-%d.log combined
ErrorLog |d:/apache/apache/bin/cronolog.exe
d:/apache/apache/logs/ssl/engine/engine.%Y-%m-%d.log

#for ssl logs
ErrorLog |d:/apache/apache/bin/cronolog.exe
d:/apache/apache/logs/ssl/error/error.%Y-%m-%d.log
TransferLog |d:/apache/apache/bin/cronolog.exe
d:/apache/apache/logs/ssl/access/access.%Y-%m-%d.log
CustomLog |d:/apache/apache/bin/cronolog.exe
d:/apache/apache/logs/ssl/ssl_request/ssl_request.%Y-%m-%d.log \
  %{[%Y-%m-%d %H:%M:%S]}t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \%r\
%b

#for mod_jk log
JkLogFile |d:/apache/apache/bin/cronolog.exe
d:/apache/apache/logs/mod_jk/mod_jk.%Y.%m.%d.log

Thanks,
Michael

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Re: Request jsp pages from server and store them on disk

2005-08-18 Thread John Hicks

Erik Labree wrote:

Davide Bianchi davide at onlyforfun.net writes:



Erik Labree wrote:


To generate those local file we need to have a tool/script that looks at the
directory structure of the webapplication and does requests to the pages it
can
see and save each page as plain text in the same directory structure as the
webapp to the file system.
Are there already tools that do this or otherwise any input on how to do this
would be greatly appriciated. 


Every browser can do it. Otherwise there are 'spiders' that can crawl
and download an entire site.

Davide



Thanks Davide,

'Spiders' seem like a good way to go because it needs to be automated.
Anyoneany experience with them? 


Erik


wget is a GNU utility available with most Linux distributions that can 
act as a spider to download and store an entire web site.


See: http://www.gnu.org/software/wget/wget.html

John


-
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: [EMAIL PROTECTED]
 from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] how can i search the APACHE.org archives

2005-08-18 Thread MEENA SELVAM
This link doesnt include search facility
http://mail-archives.apache.org/mod_mbox/httpd-users/

is there any other link where i can search thru the
httpd.apache.org archive
meena

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] How to solve this descriptor problem on solaris 8 and apache 1.3.33

2005-08-18 Thread Harald Falkenberg
Hallo,

in the error log of the apache server (version 1.3.33) I noticed the
following lines:

[Wed Aug 17 12:48:49 2005] [warn] send body: filedescriptor (1220) larger
than FD_SETSIZE (1024) found, you probably need to rebuild Apache with a larger
FD_SETSIZE

The server is configured with 70 shared servers and ulimit is set to
ulimit -n 2048

There seems to be a limit inside apache. How can I change it?

Furthermore I would like to know why apache is requirering so many
descriptors. We use inside apache mods for php and perl. Does this affect?

regards
Harald

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] Host header field: How is it enforced or not at all?

2005-08-18 Thread Khoa Nguyen
Hi,

I don't quite understand the use of the Host: header field in HTTP 1.1
request. For example, I wrote a simple script to connect to
www.google.com on port 80. After the connection, I send the following
GET request:

GET / HTTP/1.1
Host: whatever.com
...

The web server doesn't seem to care what I put in the Host field and
always returns the google home page. Is this behaviour acceptable? Why
a HTTP 1.1 web server insists on the presence of a Host field but
doesn't seem to do any kind of checking on it?

Thanks,
Khoa 


Re: [EMAIL PROTECTED] Host header field: How is it enforced or not at all?

2005-08-18 Thread Ivan Barrera A.
Khoa Nguyen wrote:
 Hi,
 
 I don't quite understand the use of the Host: header field in HTTP 1.1
 request. For example, I wrote a simple script to connect to
 www.google.com http://www.google.com on port 80. After the connection,
 I send the following GET request:
 
 GET / HTTP/1.1
 Host: whatever.com http://whatever.com
 ...
 
 The web server doesn't seem to care what I put in the Host field and
 always returns the google home page. Is this behaviour acceptable? Why a
 HTTP 1.1 web server insists on the presence of a Host field but doesn't
 seem to do any kind of checking on it?

What if you have the same index for all vhosts ?
What if you are using just 1 vhost (so, the default one) ?

It isn't a matter of HTTP/1.1 spec. It is a matter on how you configure
your webserver.

 
 Thanks,
 Khoa

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Host header field: How is it enforced or not at all?

2005-08-18 Thread William A. Rowe, Jr.

Why is that your issue?  This is how google configured their servers.

Read the NameVirtualHost directive; all requests to an unrecognized
host will be routed to the first (default) named virtual host in the
config.

You didn't expect Host: to act as some proxy service, did you?

Khoa Nguyen wrote:

Hi,

I don't quite understand the use of the Host: header field in HTTP 1.1 
request. For example, I wrote a simple script to connect to 
www.google.com http://www.google.com on port 80. After the connection, 
I send the following GET request:


GET / HTTP/1.1
Host: whatever.com http://whatever.com
...

The web server doesn't seem to care what I put in the Host field and 
always returns the google home page. Is this behaviour acceptable? Why a 
HTTP 1.1 web server insists on the presence of a Host field but doesn't 
seem to do any kind of checking on it?


Thanks,
Khoa


-
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: [EMAIL PROTECTED]
 from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] how can i search the APACHE.org archives

2005-08-18 Thread Joshua Slive
On 8/18/05, MEENA SELVAM [EMAIL PROTECTED] wrote:
 This link doesnt include search facility
 http://mail-archives.apache.org/mod_mbox/httpd-users/
 
 is there any other link where i can search thru the
 httpd.apache.org archive

Somebody was working on adding search to the archives, but I think it
may be a while.

On the other hand, google has significant coverage of the site (1.3
million pages from what I can tell), searching google with the 
site:mail-archives.apache.org keyword will probably work.
There are also searchable archives here:
http://marc.theaimsgroup.com/?l=apache-httpd-users
and probably in other locations as well.

Joshua.

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Why does Apache use up all my memory?

2005-08-18 Thread Joe Orton
On Thu, Aug 18, 2005 at 02:48:26PM -0400, George Adams wrote:
 Joe, I just wanted to thank you again.  The byterange patch you gave me 
 worked just beautifully.

Great, thanks for the feedback.  I've proposed this for backport to the 
2.0.x branch now so it should show up in a 2.0.x release eventually, 
pending review.

joe

-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] Host header field: How is it enforced or not at all?

2005-08-18 Thread Khoa Nguyen
Thank you. That does the trick quite nicely!

KhoaOn 8/18/05, Ivan Barrera A. [EMAIL PROTECTED] wrote:
Khoa Nguyen wrote: Thanks for your quick response. I have tried to configure two name-based virtual hosts on my server machine: server5.com 
http://server5.com and server6.com http://server6.com. In the request, I specified Host: 
whatever.com http://whatever.com. The server still sends a page back from server5.com http://server5.com
. How do I enforce the server to send some negative message (e.g. 404 Not Found) back to the client if the Host: field value is not configured on the server as a virtual host?In apache, you must create a default vhost which points to an error message.
The first virtual host becomes the default, so define a virtual hostbefore www.server5.com that points to the page containing the message.;) Thanks,
 Khoa On 8/18/05, *Ivan Barrera A.* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Khoa Nguyen wrote:
  Hi,   I don't quite understand the use of the Host: header field in HTTP 1.1  request. For example, I wrote a simple script to connect to  
www.google.com http://www.google.com http://www.google.com on port 80. After the connection,
  I send the following GET request:   GET / HTTP/1.1  Host: whatever.com http://whatever.com
 http://whatever.com  ...   The web server doesn't seem to care what I put in the Host field and  always returns the google home page. Is this behaviour acceptable?
 Why a  HTTP 1.1 web server insists on the presence of a Host field but doesn't  seem to do any kind of checking on it? What if you have the same index for all vhosts ?
 What if you are using just 1 vhost (so, the default one) ? It isn't a matter of HTTP/1.1 spec. It is a matter on how you configure your webserver.   Thanks,
  Khoa - 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: [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] from the digest: 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] For additional commands, e-mail: 
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]-
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: 
[EMAIL PROTECTED]  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[EMAIL PROTECTED] Apache Password Issue

2005-08-18 Thread Sean Mcallister
Hi, I have two directories, but of which are password protected in a
similar manner, though the username/password for each is
different. One directory behaves like I expect, and prompts you
for a password when you first go to it, then keeps you authenticated
while you go to various links in the directory. The other,
however, prompts for the password everytime you click on a link or even
refresh the page. The permissions in both the directories are the
same, as are the permissions on the .htaccess and .htpasswd files
(which reside in the same directory) Does anyone know what would
cause this?


[EMAIL PROTECTED] Password protecting a directory without .htaccess

2005-08-18 Thread theshz
Hi, I'm trying to password protect a directory. The usual approach is to use
.htaccess files, which requires BasicAuthentication. The problem I have is
that my website already has a custom login/logout feature, so I can't ask
the user to type in name/password again to access the protected directory.
When the user is logged in, I'm keeping a variable in the session to
indicate that, I'd like to check this variable to allow/disallow access to
the directory. How can I achieve this?

(This seems to be the common feature out there, I think very few are using
the BasicAuthentication's usual popup window to enter name/password, instead
almost every site has their own login/logout page. How do they allow access
to some static contents?)

Thanks.

theshz



-
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: [EMAIL PROTECTED]
  from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]