[EMAIL PROTECTED] How to configure Apache to processes .html file

2008-09-11 Thread Varuna Seneviratna
Hello
 When I save a file with a .html extension ,Apache does not processes
the PHP script in it.How to  configure Apache to processes PHP in .html
files?

Thanks Varuna

-- 
Varuna Seneviratna
No 514 Udumulla Road
Battaramulla
Sri Lanka
Tel : 011-2888620
Mobile:0715617141


Re: [EMAIL PROTECTED] Apache and lingering close

2008-09-11 Thread Matus UHLAR - fantomas
On 10.09.08 19:59, Arnab Ganguly wrote:
> MaxClients 256 and there are 4 instances.Server-stat page is not available
> as due to heavy load.This doesn't happen in case of normal traffic.This
> pause remains for sometime and again it comes back after a while.

4 instances of what? 4 childs of apache process or 4 different groups with
different configuration? If the latter, what's the total number of apache
processes?

And, what remote IPs are those finished connections from? Can it be DoS or
some misbehaving client(s)?

> I am using KeepAlive Off.I tried setting it to On with default
> KeepAliveTimeout and MaxKeepAliveRequests but the result was same.My Timeout
> value is default to 300 sec.

the KeepAlive may help when the same client sends more requests - it does
not need to open more connections.

> >From the Client I get "connection refused" during the time of pause but
> Apache server is available still.

-- 
Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Save the whales. Collect the whole set.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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 to configure Apache to processes .html file

2008-09-11 Thread Matus UHLAR - fantomas
On 11.09.08 12:57, Varuna Seneviratna wrote:
>  When I save a file with a .html extension ,Apache does not processes
> the PHP script in it.How to  configure Apache to processes PHP in .html
> files?

- you should not name PHP files as .html

- just do it the same way PHP files are marked to be processes with PHP
  interpreter (AddType)
-- 
Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I just got lost in thought. It was unfamiliar territory. 

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] hardware for proxy

2008-09-11 Thread Matus UHLAR - fantomas
> On 9/10/08, Matus UHLAR - fantomas <[EMAIL PROTECTED]> wrote:
> > On 09.09.08 21:23, [EMAIL PROTECTED] wrote:
> >  > 5000 reqs/sec @ 20 KB/req = 100 MB/sec = 1Gbaud.  One gigabit network1
> >
> >  please don't mess bauds and bits per second. it's something very different.
> >  http://en.wikipedia.org/wiki/Baud

On 10.09.08 11:36, [EMAIL PROTECTED] wrote:
> Thanks.  Back in the modem days, baud was (correctly) shorthand for
> bps.  Wikipedia states that is no longer valid.

it was right only for 300baud/bps modems, all other had higher bit than
bayud rate ;)

> >  it's even 800, not 1000 Mbits per second...
> >  Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
> 
> Rough conversion (from the old days) was:
> 1 byte of data
> = 8 bits on disk
> = 10 bits of network traffic

this was also correct in modem times. I don't think that network
(http/tcp/ip) headers cause that big overhead now :) Yes, it depends on size
of average requests... However we should count that into average size of
request...
 
> = 13 bits of encrypted (SSL) network traffic

Interesting, I guess that mostly applies to SSL handshake overhead. I don't
have the numbers but I guess encrypted text should not be much bigger than
non-encrypted. 

Does somebody have the data?

-- 
Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
On the other hand, you have different fingers. 

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: cgi-bin stopped working in apache ?! please help SOLVED

2008-09-11 Thread Krist van Besien
On Tue, Sep 9, 2008 at 10:25 PM, Zach Uram <[EMAIL PROTECTED]> wrote:
.
>> 2) in the apache.conf, there is something like
>> Include /etc/apache2/sites-enabled/*

I have a config layout similar to yours. What I do is prefix all my
virtualhost configs with a number. So I have:
000_default
001_www

etc...
This way I can make certain they are included in the order I want.

Krist

-- 
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: cgi-bin stopped working in apache ?! please help SOLVED

2008-09-11 Thread André Warnier

Zach Uram wrote:

On Tue, Sep 9, 2008 at 3:54 PM, André Warnier <[EMAIL PROTECTED]> wrote:

Just a guess :

1) the new entry you have added to /etc/apache2/sites-available (and
sites-enabled) is called e.g. "darcs", which for some reason precedes
"default" in the directory.
2) in the apache.conf, there is something like
Include /etc/apache2/sites-enabled/*
3) so now, when Apache starts, it "includes" the configuration of your new
Virtual Host *before* it includes the "default" Virtual Host.
4) as a result, the default virtual host is no longer "default", but
"darcs", and nothing works anymore like before.
(It is the new default because it is now the first defined virtual host in
your setup)


Check :
rename /etc/apache2/sites-available/darcs to
/etc/apache2/sites-available/xxx (and the same for sites-enabled), and
restart Apache.  Does it work again ?

Am I close ?

André


Hi André,

I figured it out before I read your message but yes that seems to be
what happened. I have removed the other terms from
/etc/apache2/sites-available/darcs in ServerAlias so it now has:


   ServerName darcs.jesujuva.org
   ServerAlias darcs.jesujuva.org
   DocumentRoot /var/www/darcs


I restarted apache and it works. Someone had recommended I add those
terms to ServerAlias and that is what screwed me up. This was the
first time I setup a virtual host so I must be careful what *advice* I
apply :-) BTW by ServerName it is the subdomain (ie.
http://darcs.jesujuva.org) and then what is the difference exactly
between that and ServerAlias?

In your above configuration, the ServerAlias is totally unnecessary, 
since it is the same as the ServerName.
You would only need ServerAlias if that same virtual server could/should 
be accessed using different (valid DNS) hostnames, like

ServerName darcs.jesujuva.org
ServerAlias www.darcs-jesujuva.org
ServerAlias www1.jesujuva.org
etc..
(all of these names in DNS pointing to the same IP address of your server).

Apart from the related tip from Kris about the various virtual server 
config files in /etc/apache2/sites-available and 
/etc/apache2/sites-enabled, here is what I do to insure that virtual 
servers are "included" in the correct order :



# Include the "Generic" site definitions
Include /etc/apache2/sites-enabled/.Generic

NameVirtualHost *:80

# Include the "default server" site definitions
Include /etc/apache2/sites-enabled/.default

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/[^.#]*

The first 2 includes each include a specific file, which I name with a 
starting dot (.)

(To make sure of the order in which those files are included)

The final include then includes all the other files (through links in 
/etc/apache2/sites-enabled/), whose names do not start with a dot 
(because usually, apart from the default server, it does not matter in 
which order the virtual hosts are defined).



Since you are new to Virtual Hosts, let me give you some more 
information/tips :


1) Everything you put in the Apache configuration file prior to the 
"NameVirtualHost" line, are parameters that act as default values for 
*all* your Virtual Hosts (including the default Virtual Host).
So whenever a Virtual Host "needs" a parameter value, and it is not 
explicitly defined in his own  section, it will use the 
default parameter value as defined before the "NameVirtualHost" line.


After the "NameVirtualHost" line, what you define is individual 
"personalities" of your webserver, one personality per  
section.  Any configuration parameter defined there, overrides the 
default specified in the main section above.


2) A VirtualHost is not a separate webserver.  All Apache "children" are 
identical, and are able to "take the personality" of any of the Virtual 
Hosts, depending on the request that comes in.
When a request comes in, it is always first given to the "main" Apache 
process.  That one looks which "Apache child" is currently available, 
and passes the request to that one for processing.
The "main" Apache process does not handle requests.  It just gets all 
the requests, and passes them to children for processing.  It also is 
the one who decides how many children run, when to start or kill one, etc..


The selected Apache child then looks at the "Host:" header line of the 
request to see to which VirtualHost the request "wants to talk", and it 
then "takes the personality" of that specific VirtualHost to process the 
request.  If the child does not find a "Host:" line, or if the name 
given in the "Host:" line does not match any of the ServerName or 
ServerAlias directives in any of the  sections, then the 
child takes the personality of the default VirtualHost to answer the 
request.  The default VirtualHost has nothing special, it just happens 
to be the first  section that Apache encounters when it 
loads its configuration file.


I just felt like telling you the above because I have the impression 
that a misunderstanding of the above is the 

Re: [EMAIL PROTECTED] Checking if file or directory exist

2008-09-11 Thread Jason Pruim


On Sep 10, 2008, at 2:21 PM, Justin Pasher wrote:


Jason Pruim wrote:


On Sep 10, 2008, at 1:38 PM, Justin Pasher wrote:


Jason Pruim wrote:
Actually it is... It was something that I tried to fix the  
problem. All the links refer to /mail.php though...


BEGIN LOG
192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
init rewrite engine with requested uri /mail.php
192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (3)  
applying pattern '.' to uri '/mail.php'
192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (4)  
RewriteCond: input='/mail.php' pattern='!-f' => matched
192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (4)  
RewriteCond: input='/mail.php' pattern='!-d' => matched
192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
rewrite /mail.php -> /p.php
192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
local path result: /p.php
192.168.0.253 - - [10/Sep/2008:13:28:26 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
prefixed with document_root to /Volumes/RAIDer/webserver/ 
purl.schreurprinting.com/p.php


Also here is my directory structure...

qs:/etc/httpd/sites japruim$ ls /volumes/raider/webserver/ 
purl.schreurprinting.com

build  matched
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (4)  
RewriteCond: input='/mail.php' pattern='!-d' => matched
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
rewrite /mail.php -> /p.php
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
local path result: /p.php
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (2)  
prefixed with document_root to /Volumes/RAIDer/webserver/ 
purl.schreurprinting.com/p.php
192.168.0.253 - - [10/Sep/2008:13:40:25 -0400]  
[purl.schreurprinting.com/sid#183ecd8][rid#1836238/initial] (1) go- 
ahead with /Volumes/RAIDer/webserver/purl.schreurprinting.com/p.php  
[OK]



But /volumes/raider/webserver/purl.schreurprinting.com/mail.php is  
valid... that is the entire file system path... but it's there :)


Would this be easier to setup in a .htaccess file?


According to this log, the request to just http://purl.scherurprinting.com/mail.php 
 is also being rewritten now...? Wasn't this one working before (in  
the initial email)?


I did a quick test inside a VirtualHost instead of .htaccess and,  
sure enough, the %{REQUEST_FILENAME} became just "/mail.php". It  
looks like Apache is stripping off the DocumentRoot from % 
{REQUEST_FILENAME} when used in the apache config. Try moving the  
rewrite settings to an .htaccess file and see what the log shows  
(especially for the "input=" line). If it works, and it is a  
feasible solution, I'd go that route. It also allows you to modify  
the rewrite rules without forcing an apache reload.



That is odd I moved the rewrite rules to a .htaccess file and now  
the real links work right, but the false links don't go into my  
handeler script... in other words http://purl.schreurprinting.com/mail.php?purl=jasonpruim112 
 works but http://purl.schreurprinting.com/jason

Re: [EMAIL PROTECTED] Checking if file or directory exist

2008-09-11 Thread Eric Covener
On Thu, Sep 11, 2008 at 6:28 AM, Jason Pruim <[EMAIL PROTECTED]> wrote:

> Here is my .htaccess file... Does it look right?
>
> Options +FollowSymlinks
> RewriteEngine on
> RewriteLog /var/log/purl.virt.rewrite.log

is this valdi in .htaccess?

> RewriteLogLevel 9
>

where's RewriteBase?

> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . /p.php [L]

You're not capturing or passing anything, and how do you get to mail.php?

-- 
Eric Covener
[EMAIL PROTECTED]

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] Checking if file or directory exist

2008-09-11 Thread Jason Pruim


On Sep 11, 2008, at 7:30 AM, Eric Covener wrote:

On Thu, Sep 11, 2008 at 6:28 AM, Jason Pruim <[EMAIL PROTECTED]>  
wrote:



Here is my .htaccess file... Does it look right?

Options +FollowSymlinks
RewriteEngine on
RewriteLog /var/log/purl.virt.rewrite.log


is this valdi in .htaccess?


My guess is no since it's not working...





RewriteLogLevel 9



where's RewriteBase?


I thought that rewritebase was optional?




RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /p.php [L]


You're not capturing or passing anything, and how do you get to  
mail.php?


after you load purl.schreurprinting.com/jasonpruim112 there will be a  
link to http://purl.schreurprinting.com/mail.php?purl=jasonpruim112


The basic premise I have been working off of is just simply if the  
file exists, let that file handle serving the page, if it DOESN"T  
exist pass it to p.php to handle it.


So with that understanding I don't think that I need to capture  
anything in the rewritecond's other then if the file exists correct?


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
[EMAIL PROTECTED]





-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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 to configure Apache to processes .html file

2008-09-11 Thread Norman Peelman

Varuna Seneviratna wrote:

Hello
 When I save a file with a .html extension ,Apache does not 
processes the PHP script in it.How to  configure Apache to processes 
PHP in .html files?


Thanks Varuna

--
Varuna Seneviratna
No 514 Udumulla Road
Battaramulla
Sri Lanka
Tel : 011-2888620
Mobile:0715617141
 You can have any file-extension parsed by adding that extension to the 
AddType directive (found in main httpd.conf, apache.conf, or 
mods-enabled - php.conf). But you should have a system such as:


# these get processed by the php interpreter (space delimited)
AddType application/x-httpd-php .php .htm .

 I personally use (for me it's php5.conf):

.php .htm for pure php scripts or mixed php/html

and I use .html .shtml for completely static pages (you don't need to 
tell apache this.)



--
Norman
Registered Linux user #461062
-Have you been to www.apache.org yet?-

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] Performance problems

2008-09-11 Thread Thomas Moyer

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I am having some problems with performance when using mod_python to  
serve some dynamic content.  The request handler gathers information  
being generated by background processes on the system, and then  
creates a simple XML document that is sent to the client. Here is the  
code I am using with some explanation.


requestedFilePath = "/" + req.filename.split("/")[-1] 
[:-4].replace("_", "/").replace("-",".")

sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.connect(ATTService)
Attest = message.recvMsg(sock)[0]
sock.close()

fmt = "%ds" % len(requestedFilePath)
msg = struct.pack(fmt, requestedFilePath)
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.connect(MHTService)
message.sendMsg(sock, msg, fmt)
MHTList = message.recvMsg(sock)[0]
sock.close()

req.content_type = 'text/xml'
req.write("%s%s" % (Attest,MHTList))
return apache.OK

There are 3 different pieces here.  The first block connects to a  
daemon running on the system that is monitoring the system. I connect  
to a Unix domain socket and receive the most recent information it  
has.  I then do the same thing with another daemon that is gathering  
information about files that are available on the system. Finally I  
combine these two blocks of information and send it to the client.


My problem is, when I start using benchmarking tools like JMeter, and  
I put the system under any sort of load (100 clients for example), the  
first recvMsg call (Attest = message.recvMsg(sock)[0]) takes about 12  
seconds to complete per client.  I watch top during the run and see  
that the apache processes are completely occupied (usually showing 120+ 
% CPU usage).  The system running apache is an 8-core machine with  
16GB of RAM so I'm pretty sure there isn't a resource problem for  
either memory or processor.


I'm not really sure where to look next to understand why a simple  
socket recv() call is taking 12 seconds to complete.  The amount of  
data being recv()'d is ~80K of text if that makes a difference.


Below is the config file for Apache:
ServerRoot "/etc/apache2"
LockFile /var/lock/apache2/accept.lock
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15

StartServers  5
MinSpareServers   5
MaxSpareServers  10
MaxClients  150
MaxRequestsPerChild   0


StartServers  2
MaxClients  150
MinSpareThreads  25
MaxSpareThreads  75
ThreadsPerChild  25
MaxRequestsPerChild   0

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
AccessFileName .htaccess

Order allow,deny
Deny from all

DefaultType text/plain
HostnameLookups Off
ErrorLog /var/log/apache2/error.log
LogLevel warn
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/httpd.conf
Include /etc/apache2/ports.conf
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i 
\"" combined

LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
ServerTokens Full
ServerSignature On
PythonOption mod_python.mutex_locks 32
PythonOptimize On
Include /etc/apache2/conf.d/
Include /etc/apache2/sites-enabled/

Enabled Modules:
lias.conf
alias.load
auth_basic.load
authn_file.load
authz_default.load
authz_groupfile.load
authz_host.load
authz_user.load
autoindex.load
cgid.load
dir.load
env.load
mime.load
mod_python.load
negotiation.load
setenvif.load
status.load

And finally the site configuration itself:
NameVirtualHost *

ServerAdmin [EMAIL PROTECTED]
DocumentRoot /var/www/

Options FollowSymLinks
AllowOverride None


Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
AddHandler mod_python .aca
PythonHandler serveACA | .aca
PythonPath "sys.path + ['/var/shamon/']"
PythonDebug On

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"

Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128



Not sure what other information is needed.

~tom
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (Darwin)

iE

[EMAIL PROTECTED] Re: Regarding Apache HTTP Authentication with an Oracle Database

2008-09-11 Thread Steve Whitson

Hi Rajaopal M.,

In order to use the mod_dbd.so, and mod_authn_dbd.so modules with mysql 
I had to build the mysql dbd driver provided in the arp-util (within 
Apache httpd-2.2.9).


To accomplish this I used the configure flag noted in apr-util:

./httpd-2.2.9/srclib/apr-util> configure --help | grep -i mysql
 --with-mysql=DIRenable MySQL DBD driver

I passed this --with-mysql flag to the top level configure when 
configuring httpd-2.2.9.  Even though it doesn't undestand this flag, it 
passes it on to lower level configurations, such as when configuring 
apr-util.


I have no experience with Oracle, but here are the Oracle configure 
flags I found in the configure help in apr-util:


./httpd-2.2.9/srclib/apr-util> configure --help | grep -i ora
 --with-oracle-include=DIR
 path to Oracle include files
 --with-oracle=DIR   enable Oracle DBD driver; giving ORACLE_HOME 
as DIR


Hope this helps,
  -Steve


Rajagopal M. wrote:


Hi Steve,

 

I am RajaGopal Maddi. I have seen from one of the blogs in 
objectmix.com that you have used MySQL database for HTTP 
Authentication in Apache?


 

Is it resolved for you? Steve, what should I do for doing the same 
with Oracle Database? Where do we get the apr_dbd_oracle.so from?


 


Please throw some light on interaction with the Oracle Database.

 


Thanks

RajaGopal Maddi





[EMAIL PROTECTED] problem serving large files

2008-09-11 Thread John LaCour
I'd like to make some very large files available for HTTP download from my
Apache v2.2.3 server on RHEL5, but it's not working.

 

I get the following error message:

[error] [client 10.1.1.1] (13)Permission denied: access to
/Very_Large_File.rar denied

 

 

It would appear to be a file permission problem, but the directory paths to
the document root are all 755 or better:

 

/

/var

/var/www/

/var/www/html

 

and the permissions on the file itself I've set to 777 for testing purposes.

 

The same client can download small .rar files from the same directory with
the same file permissions.   The only difference that I can discern is that
the file is smaller in size.

 

I've further tested access to the file with "sudo -u apache cat
Very_Large_file.rar" which can open the file fine.   So I've pretty much
ruled out permissions issues.

 

 

I've also enabled 'debug' LogLevel but there's nothing generated that is
helpful.

 

I don't see anything in my .conf files that enforce any file sizes.I
didn't even see such an option in the document, there appears to be
configuration options only for limiting the size of the HTTP request *sent*
by the client.

 

Any insight into what's happen would be appreciated!

 

Thanks,

John

 

 



[EMAIL PROTECTED] Proxy/Caching external sites

2008-09-11 Thread Olivier Marti

Dear all

For our website we implemented the addthis-scripts be I want them to  
get proxied and cached our the server locally,
so when the addthis server is down, or in generall, the Javascript  
from addthis is provided from our server only

recaching it now and then from it's orignial source.

I tried now serveral times to make it work using mod_proxy and  
mod_cache but I don't get it to work.
Any ideas how the configuration should look like? Here is an example  
of what I allready did so far (not working):




ServerName my.site.com
DocumentRoot "/Library/WebServer/Documents"


ProxyRequests Off


Order deny,allow
Allow from all


ProxyPass   /addthis/ http://www.addthis.com/



CacheRoot D:/server/apache2/cache
CacheEnable disk /addthis
CacheDirLevels 5
CacheDirLength 3
CacheDefaultExpire 86400






The link withing the page then looks something like: /addthis/ 
bookmark.php


Thanks in advanced,
Olivier



-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] Checking if file or directory exist

2008-09-11 Thread Justin Pasher

Jason Pruim wrote:

On Sep 11, 2008, at 7:30 AM, Eric Covener wrote:


On Thu, Sep 11, 2008 at 6:28 AM, Jason Pruim <[EMAIL PROTECTED]> wrote:


Here is my .htaccess file... Does it look right?

Options +FollowSymlinks
RewriteEngine on
RewriteLog /var/log/purl.virt.rewrite.log


is this valdi in .htaccess?


My guess is no since it's not working...


Log directives cannot be used in .htaccess files (it could be a 
potential security hole to allow a user to specify their own logs, 
hammer the site with requests, then fill up a partition). Normally you 
would receive a 500 error code and a message in the apache error logging 
stating the directory is not allowed. You can, however, just leave it in 
the global/virtualhost apache config.



RewriteLogLevel 9



where's RewriteBase?


I thought that rewritebase was optional?


It is optional. It all depends on your setup/usage as to whether you 
need to use it.



RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /p.php [L]

RewriteCond %{REQUEST_FILENAME} !-f

You're not capturing or passing anything, and how do you get to 
mail.php?


after you load purl.schreurprinting.com/jasonpruim112 there will be a 
link to http://purl.schreurprinting.com/mail.php?purl=jasonpruim112


The basic premise I have been working off of is just simply if the 
file exists, let that file handle serving the page, if it DOESN"T 
exist pass it to p.php to handle it.


So with that understanding I don't think that I need to capture 
anything in the rewritecond's other then if the file exists correct?


You shouldn't have to worry about capturing any query string since you 
are performing an internal rewrite (the URL stays the same for the 
user). Referring back to your other email (which I mistakenly nuked 
already)...



That is odd I moved the rewrite rules to a .htaccess file and now 
the real links work right, but the false links don't go into my handeler 
script... in other words 
http://purl.schreurprinting.com/mail.php?purl=jasonpruim112 works but 
http://purl.schreurprinting.com/jasonpruim112 does NOT...


Here is my .htaccess file... Does it look right?

Options +FollowSymlinks
RewriteEngine on
RewriteLog /var/log/purl.virt.rewrite.log
RewriteLogLevel 9

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /p.php [L]


So there is no file/directory called jasonpruim112 
, correct? I copied your 
.htaccess file (removing the RewriteLog* references) and it correctly 
rewrites the URL request for /jasonpruim112 
 to p.php. Is this not 
what you are seeing?



--
Justin Pasher

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] problem serving large files

2008-09-11 Thread Wilda, Jet
Could it be that you have SELinux enabled and it is messing with you?

 

~Jet

 



From: John LaCour [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 11, 2008 10:03 AM
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] problem serving large files

 

I'd like to make some very large files available for HTTP download from
my Apache v2.2.3 server on RHEL5, but it's not working.

 

I get the following error message:

[error] [client 10.1.1.1] (13)Permission denied: access to
/Very_Large_File.rar denied

 

 

It would appear to be a file permission problem, but the directory paths
to the document root are all 755 or better:

 

/

/var

/var/www/

/var/www/html

 

and the permissions on the file itself I've set to 777 for testing
purposes.

 

The same client can download small .rar files from the same directory
with the same file permissions.   The only difference that I can discern
is that the file is smaller in size.

 

I've further tested access to the file with "sudo -u apache cat
Very_Large_file.rar" which can open the file fine.   So I've pretty much
ruled out permissions issues.

 

 

I've also enabled 'debug' LogLevel but there's nothing generated that is
helpful.

 

I don't see anything in my .conf files that enforce any file sizes.I
didn't even see such an option in the document, there appears to be
configuration options only for limiting the size of the HTTP request
*sent* by the client.

 

Any insight into what's happen would be appreciated!

 

Thanks,

John

 

 

--
Learn more about Chase Paymentech Solutions,LLC payment processing services at 
www.chasepaymentech.com.

THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are 
proprietary and confidential information intended only for the use of the 
recipient(s) named above.  If you are not the intended recipient, you may not 
print, distribute, or copy this message or any attachments.  If you have 
received this communication in error, please notify the sender by return e-mail 
and delete this message and any attachments from your computer.



Re: [EMAIL PROTECTED] How to configure Apache to processes .html file

2008-09-11 Thread Nick Kew

# these get processed by the php interpreter (space delimited)
AddType application/x-httpd-php .php .htm .


Please don't propagate that myth.  Abusing AddType for server-side
handlers is a grotty hack inherited from the NCSA server, and has
been wrong since Apache 1.1 in 1996.

See AddHandler.

--
Nick Kew

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] Hebrew charset in apache2.conf

2008-09-11 Thread Andreas Prilop
The file apache2.conf specifies these default extensions
for Hebrew charset ISO-8859-8:

  AddCharset  ISO-8859-8  .iso8859-8  .heb  .hebrew

However, ISO-8859-8 is a charset designation for
*left-to-right* Hebrew that was useful for text/plain
messages with hard line wrapping
but that has no use with text/html.

The charset designation suitable for text/html,
i.e. for use with *right-to-left* Hebrew, is

  charset=iso-8859-8-i

Please see
 http://www.nirdagan.com/hebrew/standards.html
for details and
 http://freenet-homepage.de/prilop/hebrew.iso.html
for a test case.

ISO-8859-8-i is also available in browsers like Firefox
and Internet Explorer under the name "Logical Hebrew".

Therefore, apache2.conf should include also a line

  AddCharset  iso-8859-8-i  ..

with some suitable extensions.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] problem serving large files

2008-09-11 Thread John LaCour
Yeah, I do have SELinux enabled and thought about that.  I think using sudo
to open the file as 'apache' would have tested for that - can read the file
that way.

 

I'll try disabling it just to be 100% sure, but I don't think that's it.

 

-John

 

From: Wilda, Jet [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 11, 2008 11:24 AM
To: users@httpd.apache.org; [EMAIL PROTECTED]
Subject: RE: [EMAIL PROTECTED] problem serving large files

 

Could it be that you have SELinux enabled and it is messing with you?

 

~Jet

 

  _  

From: John LaCour [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 11, 2008 10:03 AM
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] problem serving large files

 

I'd like to make some very large files available for HTTP download from my
Apache v2.2.3 server on RHEL5, but it's not working.

 

I get the following error message:

[error] [client 10.1.1.1] (13)Permission denied: access to
/Very_Large_File.rar denied

 

 

It would appear to be a file permission problem, but the directory paths to
the document root are all 755 or better:

 

/

/var

/var/www/

/var/www/html

 

and the permissions on the file itself I've set to 777 for testing purposes.

 

The same client can download small .rar files from the same directory with
the same file permissions.   The only difference that I can discern is that
the file is smaller in size.

 

I've further tested access to the file with "sudo -u apache cat
Very_Large_file.rar" which can open the file fine.   So I've pretty much
ruled out permissions issues.

 

 

I've also enabled 'debug' LogLevel but there's nothing generated that is
helpful.

 

I don't see anything in my .conf files that enforce any file sizes.I
didn't even see such an option in the document, there appears to be
configuration options only for limiting the size of the HTTP request *sent*
by the client.

 

Any insight into what's happen would be appreciated!

 

Thanks,

John

 

 

--
Learn more about Chase Paymentech Solutions,LLC payment processing services
at www.chasepaymentech.com.
 
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are
proprietary and confidential information intended only for the use of the
recipient(s) named above.  If you are not the intended recipient, you may
not print, distribute, or copy this message or any attachments.  If you have
received this communication in error, please notify the sender by return
e-mail and delete this message and any attachments from your computer.
 


Re: [EMAIL PROTECTED] Checking if file or directory exist

2008-09-11 Thread Jason Pruim


On Sep 11, 2008, at 11:14 AM, Justin Pasher wrote:


Jason Pruim wrote:

On Sep 11, 2008, at 7:30 AM, Eric Covener wrote:

On Thu, Sep 11, 2008 at 6:28 AM, Jason Pruim <[EMAIL PROTECTED]>  
wrote:



Here is my .htaccess file... Does it look right?

Options +FollowSymlinks
RewriteEngine on
RewriteLog /var/log/purl.virt.rewrite.log


is this valdi in .htaccess?


My guess is no since it's not working...


Log directives cannot be used in .htaccess files (it could be a  
potential security hole to allow a user to specify their own logs,  
hammer the site with requests, then fill up a partition). Normally  
you would receive a 500 error code and a message in the apache error  
logging stating the directory is not allowed. You can, however, just  
leave it in the global/virtualhost apache config.



RewriteLogLevel 9



where's RewriteBase?


I thought that rewritebase was optional?


It is optional. It all depends on your setup/usage as to whether you  
need to use it.



RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /p.php [L]

RewriteCond %{REQUEST_FILENAME} !-f

You're not capturing or passing anything, and how do you get to  
mail.php?


after you load purl.schreurprinting.com/jasonpruim112 there will be  
a link to http://purl.schreurprinting.com/mail.php?purl=jasonpruim112


The basic premise I have been working off of is just simply if the  
file exists, let that file handle serving the page, if it DOESN"T  
exist pass it to p.php to handle it.


So with that understanding I don't think that I need to capture  
anything in the rewritecond's other then if the file exists correct?


You shouldn't have to worry about capturing any query string since  
you are performing an internal rewrite (the URL stays the same for  
the user). Referring back to your other email (which I mistakenly  
nuked already)...



That is odd I moved the rewrite rules to a .htaccess file and  
now the real links work right, but the false links don't go into my  
handeler script... in other words http://purl.schreurprinting.com/mail.php?purl=jasonpruim112 
 works but http://purl.schreurprinting.com/jasonpruim112 does NOT...


Here is my .htaccess file... Does it look right?

Options +FollowSymlinks
RewriteEngine on
RewriteLog /var/log/purl.virt.rewrite.log
RewriteLogLevel 9

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /p.php [L]


So there is no file/directory called jasonpruim112 , correct? I copied your .htaccess file (removing the RewriteLog*  
references) and it correctly rewrites the URL request for / 
jasonpruim112  to  
p.php. Is this not what you are seeing?


Hey Justin,

You are correct that jasonpruim112 does not exist but is linked in a  
database... Although, I did some searching on the net and fighting  
with my config files and noticed that AllowOverides was set to none  
rather then all


Once I made that switch both the main link, and the internal links all  
started working properly.


Sometimes I hate how picky computers can be hehehe.


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
11287 James St
Holland, MI 49424
www.raoset.com
[EMAIL PROTECTED]





-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] problem serving large files

2008-09-11 Thread John LaCour
Well what do you know - disabling SELinux did the trick. Running as the
'apache' user under sudo vs. a daemon process must have a different SELinux
security context.

 

Thanks!

 

From: Wilda, Jet [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 11, 2008 11:24 AM
To: users@httpd.apache.org; [EMAIL PROTECTED]
Subject: RE: [EMAIL PROTECTED] problem serving large files

 

Could it be that you have SELinux enabled and it is messing with you?

 

~Jet

 

  _  

From: John LaCour [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 11, 2008 10:03 AM
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] problem serving large files

 

I'd like to make some very large files available for HTTP download from my
Apache v2.2.3 server on RHEL5, but it's not working.

 

I get the following error message:

[error] [client 10.1.1.1] (13)Permission denied: access to
/Very_Large_File.rar denied

 

 

It would appear to be a file permission problem, but the directory paths to
the document root are all 755 or better:

 

/

/var

/var/www/

/var/www/html

 

and the permissions on the file itself I've set to 777 for testing purposes.

 

The same client can download small .rar files from the same directory with
the same file permissions.   The only difference that I can discern is that
the file is smaller in size.

 

I've further tested access to the file with "sudo -u apache cat
Very_Large_file.rar" which can open the file fine.   So I've pretty much
ruled out permissions issues.

 

 

I've also enabled 'debug' LogLevel but there's nothing generated that is
helpful.

 

I don't see anything in my .conf files that enforce any file sizes.I
didn't even see such an option in the document, there appears to be
configuration options only for limiting the size of the HTTP request *sent*
by the client.

 

Any insight into what's happen would be appreciated!

 

Thanks,

John

 

 

--
Learn more about Chase Paymentech Solutions,LLC payment processing services
at www.chasepaymentech.com.
 
THIS MESSAGE IS CONFIDENTIAL.  This e-mail message and any attachments are
proprietary and confidential information intended only for the use of the
recipient(s) named above.  If you are not the intended recipient, you may
not print, distribute, or copy this message or any attachments.  If you have
received this communication in error, please notify the sender by return
e-mail and delete this message and any attachments from your computer.
 


Re: [EMAIL PROTECTED] hardware for proxy

2008-09-11 Thread solprovider
On 9/11/08, Matus UHLAR - fantomas <[EMAIL PROTECTED]> wrote:
> > On 9/10/08, Matus UHLAR - fantomas <[EMAIL PROTECTED]> wrote:
>  > > On 09.09.08 21:23, [EMAIL PROTECTED] wrote:
>  > >  > 5000 reqs/sec @ 20 KB/req = 100 MB/sec = 1Gbps.  One gigabit network1
>  > >  it's even 800, not 1000 Mbits per second...
>  > >  Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/
>  > Rough conversion (from the old days) was:
>  > 1 byte of data
>  > = 8 bits on disk
>  > = 10 bits of network traffic
> this was also correct in modem times. I don't think that network
>  (http/tcp/ip) headers cause that big overhead now :) Yes, it depends on size
>  of average requests... However we should count that into average size of
>  request...

Network overhead is difficult to estimate.  IPv4 adds 32-36 bytes per
packet; IPv6 adds 60-64 bytes per packet.  Packet size has a large
effect --  smaller packets require more packets with more protocol
overhead ; larger packets waste more space in the final packet.  Then
add non-data packets e.g. ACKs.  My 25% overhead (2 bits overhead per
8 bits data) has produced reasonable estimates.

>  > = 13 bits of encrypted (SSL) network traffic
> Interesting, I guess that mostly applies to SSL handshake overhead. I don't
>  have the numbers but I guess encrypted text should not be much bigger than
>  non-encrypted.

I once read that encryption added 20-30%.  Modern streaming encryption
seems more efficient, but adds handshake overhead per transmission.
Again, my 30% overhead has produced reasonable working estimates.

>  Does somebody have the data?
> Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/

Ditto.  I would like better estimates, or at least more details to
support my current calculations.

solprovider

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] Checking if file or directory exist

2008-09-11 Thread Justin Pasher

Jason Pruim wrote:

RewriteRule . /p.php [L]

RewriteCond %{REQUEST_FILENAME} !-f

You're not capturing or passing anything, and how do you get to 
mail.php?


after you load purl.schreurprinting.com/jasonpruim112 there will be 
a link to http://purl.schreurprinting.com/mail.php?purl=jasonpruim112


The basic premise I have been working off of is just simply if the 
file exists, let that file handle serving the page, if it DOESN"T 
exist pass it to p.php to handle it.


So with that understanding I don't think that I need to capture 
anything in the rewritecond's other then if the file exists correct?

RewriteCond %{REQUEST_FILENAME} !-d

You shouldn't have to worry about capturing any query string since 
you are performing an internal rewrite (the URL stays the same for 
the user). Referring back to your other email (which I mistakenly 
nuked already)...



That is odd I moved the rewrite rules to a .htaccess file and now 
the real links work right, but the false links don't go into my 
handeler script... in other words 
http://purl.schreurprinting.com/mail.php?purl=jasonpruim112 works but 
http://purl.schreurprinting.com/jasonpruim112 does NOT...


Here is my .htaccess file... Does it look right?

Options +FollowSymlinks
RewriteEngine on
RewriteLog /var/log/purl.virt.rewrite.log
RewriteLogLevel 9

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /p.php [L]


So there is no file/directory called jasonpruim112 
, correct? I copied 
your .htaccess file (removing the RewriteLog* references) and it 
correctly rewrites the URL request for /jasonpruim112 
 to p.php. Is this not 
what you are seeing?


Hey Justin,

You are correct that jasonpruim112 does not exist but is linked in a 
database... Although, I did some searching on the net and fighting 
with my config files and noticed that AllowOverides was set to none 
rather then all


Once I made that switch both the main link, and the internal links all 
started working properly.


Sometimes I hate how picky computers can be hehehe.


Doh. I forgot to mention that moving to the .htaccess file would require 
apache to allow overrides in that directory. That was my default setting 
in my testing environment, so I didn't even think of it. If all else 
fails, I find checking the apache error log can sometimes reveal things 
that you may not have known were going wrong.


At any rate, it sounds like you're all set now!

--
Justin Pasher

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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 to configure Apache to processes .html file

2008-09-11 Thread Norman Peelman

Nick Kew wrote:

# these get processed by the php interpreter (space delimited)
AddType application/x-httpd-php .php .htm .


Please don't propagate that myth.  Abusing AddType for server-side
handlers is a grotty hack inherited from the NCSA server, and has
been wrong since Apache 1.1 in 1996.

See AddHandler.


Ok, thanks for the info... have changed my php.conf file accordingly.

AddHandler php5-script .php .htm

--
Norman
Registered Linux user #461062
-Have you been to www.apache.org yet?-


-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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 to configure Apache to processes .html file

2008-09-11 Thread swilting
.htm vs .phtm


Le jeudi 11 septembre 2008 à 14:05 -0400, Norman Peelman a écrit :
> Nick Kew wrote:
> >> # these get processed by the php interpreter (space delimited)
> >> AddType application/x-httpd-php .php .htm .
> >
> > Please don't propagate that myth.  Abusing AddType for server-side
> > handlers is a grotty hack inherited from the NCSA server, and has
> > been wrong since Apache 1.1 in 1996.
> >
> > See AddHandler.
> >
> Ok, thanks for the info... have changed my php.conf file accordingly.
> 
> AddHandler php5-script .php .htm
> 



-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] Url rewrite and Tomcat

2008-09-11 Thread Alessandro Fantuzzi

Hi,
I work for a web factory.
We have many sites made with jsp pages, so we have Apache and Tomcat 
working together.

For these sites we put rules like this in httpd.conf:
RewriteRule 
^/folder/([^/]+)_language/([^/]+)_([^/]+)/([^/]+)_([^/]+)\.html 
/folder/my_page.jsp?sez=$2&pag=$4 [R,L]
This rule works fine but a SEO Agency told us that it is better not to 
do the redirect and mantain the friendly url.
At first it seemed simple, in fact all you have to do is remove the "R" 
option from the rule.

But if we do so we get an error.
If you are calling
http://www.my_site.com/folder/1_language/90_Products/126_Product.html
you get this error:


 HTTP Status 404 - /folder/1_language/90_Products/126_Product.html



*type* Status report

*message* _/folder/1_language/90_Products/126_Product.html_

*description* _The requested resource 
(/folder/1_language/90_Products/126_Product.html) is not available._





 Apache Tomcat/5.5.25


As you can see it seems like Apache passes the command to Tomcat but 
instead of telling it to use /folder/my_page.jsp?sez=90&pag=126 it 
passes /folder/1_language/90_Products/126_Product.html

which Tomcat cannot find.


This is the VirtualHost definition:


ServerName www.my_site.com
ServerAlias my_site.com
DocumentRoot "C:/Programmi/Apache Software Foundation/Tomcat 
5.5/webapps/main_folder"


JkMount /main_folder/*.jsp worker1
JkMount /* worker1

RewriteEngine on

RewriteRule 
^/folder/([^/]+)_language/([^/]+)_([^/]+)/([^/]+)_([^/]+)\.html 
/folder/my_page.jsp?sez=$2&pag=$4 [L]


RewriteLog logs/rewrite.log
RewriteLogLevel 9

ErrorLog logs/site_error_log
CustomLog logs/site_access_log common



And this is the rewrite log file:
(2) init rewrite engine with requested uri 
/folder/1_language/90_Products/126_Product.html
(3) applying pattern 
^/folder/([^/]+)_language/([^/]+)_([^/]+)/([^/]+)_([^/]+)\.html to uri 
'/folder/1_language/90_Products/126_Product.html'
(2) rewrite /folder/1_language/90_Products/126_Product.html -> 
/folder/my_page.jsp?sez=90&pag=126
(3) split uri=/folder/my_page.jsp?sez=90&pag=126 -> 
uri=/folder/my_page.jsp, args=sez=90&pag=126

(2) local path result: /folder/my_page.jsp
(2) prefixed with document_root to C:/Programmi/Apache Software 
Foundation/Tomcat 5.5/webapps/main_folder/folder/my_page.jsp
(1) go-ahead with C:/Programmi/Apache Software Foundation/Tomcat 
5.5/webapps/helvetia/public/helvetia.jsp [OK]



Any help appreciated.

Bye


--

Alessandro Fantuzzi - O-one s.r.l.
E-mail: [EMAIL PROTECTED] 
Software developer

www.o-one.net 

---
Via Dante Zanichelli, 61 - 42100 Reggio Emilia
Tel. 0522 930078 - Fax. 0522 387947
---
Via Stendhal, 36 - 20144 Milano
Tel 02.42292057 - Fax 02.47770936
---

STRICTLY PERSONAL AND CONFIDENTIAL This message may contain confidential 
and proprietary material for the sole use of the intended recipient. Any 
review or distribution by others is strictly prohibited. If you are not 
the intended recipient please contact the sender and delete all copies. 
The contents of this message that do not relate to the official business 
of our company shall be understood as neither given nor endorsed by it.

---

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] way for me to turn off if-modified-since & always return 304 reply ?

2008-09-11 Thread dave selby
Is there a way for me to turn off if-modified-since so the client
browser will ALWAYS use its locally cached document

ie from the definition below Apache always returns a 304 reply ?

"If-Modified-Since: date
This request header is used with GET method to make it conditional: if
the requested document has not changed since the time specified in
this field the document will not be sent, but instead a Not Modified
304 reply. "

I realise this is unusual but in my case very needed :)

Many thanks

Dave






-- 

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] Url rewrite and Tomcat

2008-09-11 Thread Eric Covener
> http://www.my_site.com/folder/1_language/90_Products/126_Product.html
> you get this error:
>
>
>  HTTP Status 404 - /folder/1_language/90_Products/126_Product.html
> RewriteRule ^/folder/([^/]+)_language/([^/]+)_([^/]+)/([^/]+)_([^/]+)\.html
> /folder/my_page.jsp?sez=$2&pag=$4 [L]

[PT] flag?

-- 
Eric Covener
[EMAIL PROTECTED]

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] Logs

2008-09-11 Thread Grant Peel

Hi Justin,

Thanks for the reply. FYI I am using UNIX (freebsd).

Up tp this point, I have been using an sh script to rotate logs.

The logs in question are the access_log and error_log in each one of my 
(Apache) virtual hosts.


logrotate looks like the cats meow!

I have read the man page and it states to use wildcards with caution (as 
always). So I have one question:


Can I use a wildcard as such,

/home/*/logs/access_log

/home/*/logs/error_log

The '*' being the wildcard to denote the home dir for

virt_domain1.com
virt_domain2.ca
virt_domain3.net
...

-Grant

- Original Message - 
From: "Justin Pasher" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, September 10, 2008 10:18 PM
Subject: RE: [EMAIL PROTECTED] Logs



-Original Message-
From: Grant Peel [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 10, 2008 6:54 PM
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] Logs

Hi all,

I am investigating useing apache rotatelogs pipe. My servers have about
250
virtual domains each on them, so I am curious about a couple of things:

How are people in a similar setup handling remove logs (so they dont 
build

up forever), say after 2 months?

Does piping the data through the rotatelogs util slow down the server
much?


Have you considered using logrotate? I had never actually heard of
rotatelogs until now (my apache experience is primarily with Apache 1). I
would imagine that it would have a little bit of overhead (albeit a
relatively small amount, I hope). logrotate has a lot more options
available, and there's also a chance that it's already in use on your 
system

to rotate system logs in /var/log. Since it's run as a cron job, you only
experience the overheard (VERY small) when the script run each night

Of course, all of this assumes you are running in a *nix environment as
opposed to Windows. I'm not sure about the availability on Windows.

--
Justin Pasher


-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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 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] Logs

2008-09-11 Thread Justin Pasher

Grant Peel wrote:

Hi Justin,

Thanks for the reply. FYI I am using UNIX (freebsd).

Up tp this point, I have been using an sh script to rotate logs.

The logs in question are the access_log and error_log in each one of 
my (Apache) virtual hosts.


logrotate looks like the cats meow!

I have read the man page and it states to use wildcards with caution 
(as always). So I have one question:


Can I use a wildcard as such,

/home/*/logs/access_log

/home/*/logs/error_log

The '*' being the wildcard to denote the home dir for

virt_domain1.com
virt_domain2.ca
virt_domain3.net
...

-Grant


Wildcards are fine. The man pages problem say to use them with caution 
to avoid matching more files than you really intend. The easiest way to 
be sure is just test the results of the wildcard with ls.


ls /home/*/logs/access_log

If the results are what you expect, then you are good to go. You can 
also combine the two log filenames in the same logrotate rule to avoid 
duplicating your settings.


Just keep in mind that with this setup, if a user has a file such as 
/home/username/logs/access_log, then it will be rotated too. However, if 
your setup doesn't allow users to create arbitrary directories/files 
like that, then there is no need to worry.


--
Justin Pasher

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] Logs

2008-09-11 Thread Grant Peel

Justin,

Kewl!

There are a few users in the home directory as well, and those users do not 
have a logs directory. How will logrotate handle that? (I am hoping you will 
say it just ignores a non existent path/file).


-Grant

- Original Message - 
From: "Justin Pasher" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, September 11, 2008 6:10 PM
Subject: Re: [EMAIL PROTECTED] Logs



Grant Peel wrote:

Hi Justin,

Thanks for the reply. FYI I am using UNIX (freebsd).

Up tp this point, I have been using an sh script to rotate logs.

The logs in question are the access_log and error_log in each one of my 
(Apache) virtual hosts.


logrotate looks like the cats meow!

I have read the man page and it states to use wildcards with caution (as 
always). So I have one question:


Can I use a wildcard as such,

/home/*/logs/access_log

/home/*/logs/error_log

The '*' being the wildcard to denote the home dir for

virt_domain1.com
virt_domain2.ca
virt_domain3.net
...

-Grant


Wildcards are fine. The man pages problem say to use them with caution to 
avoid matching more files than you really intend. The easiest way to be 
sure is just test the results of the wildcard with ls.


ls /home/*/logs/access_log

If the results are what you expect, then you are good to go. You can also 
combine the two log filenames in the same logrotate rule to avoid 
duplicating your settings.


Just keep in mind that with this setup, if a user has a file such as 
/home/username/logs/access_log, then it will be rotated too. However, if 
your setup doesn't allow users to create arbitrary directories/files like 
that, then there is no need to worry.


--
Justin Pasher

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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 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] Logs

2008-09-11 Thread Justin Pasher

Grant Peel wrote:

Justin,

Kewl!

There are a few users in the home directory as well, and those users 
do not have a logs directory. How will logrotate handle that? (I am 
hoping you will say it just ignores a non existent path/file).


-Grant



You will be safe. The wildcards simply use the shell's globbing 
functionality, which means that it will only return files that exist.


Justin Pasher

- Original Message - From: "Justin Pasher" 
<[EMAIL PROTECTED]>

To: 
Sent: Thursday, September 11, 2008 6:10 PM
Subject: Re: [EMAIL PROTECTED] Logs



Grant Peel wrote:

Hi Justin,

Thanks for the reply. FYI I am using UNIX (freebsd).

Up tp this point, I have been using an sh script to rotate logs.

The logs in question are the access_log and error_log in each one of 
my (Apache) virtual hosts.


logrotate looks like the cats meow!

I have read the man page and it states to use wildcards with caution 
(as always). So I have one question:


Can I use a wildcard as such,

/home/*/logs/access_log

/home/*/logs/error_log

The '*' being the wildcard to denote the home dir for

virt_domain1.com
virt_domain2.ca
virt_domain3.net
...

-Grant


Wildcards are fine. The man pages problem say to use them with 
caution to avoid matching more files than you really intend. The 
easiest way to be sure is just test the results of the wildcard with ls.


ls /home/*/logs/access_log

If the results are what you expect, then you are good to go. You can 
also combine the two log filenames in the same logrotate rule to 
avoid duplicating your settings.


Just keep in mind that with this setup, if a user has a file such as 
/home/username/logs/access_log, then it will be rotated too. However, 
if your setup doesn't allow users to create arbitrary 
directories/files like that, then there is no need to worry.


--
Justin Pasher


-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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] Logs

2008-09-11 Thread Alexandru David Constantinescu

Grant Peel wrote:

Hi Justin,

Thanks for the reply. FYI I am using UNIX (freebsd).

Up tp this point, I have been using an sh script to rotate logs.

The logs in question are the access_log and error_log in each one of my 
(Apache) virtual hosts.


logrotate looks like the cats meow!

I have read the man page and it states to use wildcards with caution (as 
always). So I have one question:


Can I use a wildcard as such,

/home/*/logs/access_log

/home/*/logs/error_log

The '*' being the wildcard to denote the home dir for

virt_domain1.com
virt_domain2.ca
virt_domain3.net
...

-Grant

- Original Message - From: "Justin Pasher" 
<[EMAIL PROTECTED]>

To: 
Sent: Wednesday, September 10, 2008 10:18 PM
Subject: RE: [EMAIL PROTECTED] Logs



-Original Message-
From: Grant Peel [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 10, 2008 6:54 PM
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] Logs

Hi all,

I am investigating useing apache rotatelogs pipe. My servers have about
250
virtual domains each on them, so I am curious about a couple of things:

How are people in a similar setup handling remove logs (so they dont 
build

up forever), say after 2 months?

Does piping the data through the rotatelogs util slow down the server
much?


Have you considered using logrotate? I had never actually heard of
rotatelogs until now (my apache experience is primarily with Apache 1). I
would imagine that it would have a little bit of overhead (albeit a
relatively small amount, I hope). logrotate has a lot more options
available, and there's also a chance that it's already in use on your 
system

to rotate system logs in /var/log. Since it's run as a cron job, you only
experience the overheard (VERY small) when the script run each night

Of course, all of this assumes you are running in a *nix environment as
opposed to Windows. I'm not sure about the availability on Windows.

--
Justin Pasher


-
The official User-To-User support forum of the Apache HTTP Server 
Project.

See 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 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]




I don't think that the idea to keep separate logs (real time) for each 
virtualhost it's a good idea. Think to the IO involve in this 
operations. Let's say you have 300 vhost, your system must write in 600 
separate files.

Once I have the same problem. The solution was :
1 - to keep just two file access log and error log;
2 - logrotate rotate this files every 1 hour (on 00 I have 48 gzip files);
3 - I use split-logfile (a perl script from apache I think) to split 
every log for each vhost and put the chunk in homedir of each vhost

4 - move (copy) that 48 gzip log files on separate server for archiving.

Alex

-
The official User-To-User support forum of the Apache HTTP Server Project.
See 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]