RE: [EMAIL PROTECTED] silent URL redirect/cloak with mod_rewrite

2008-04-21 Thread Boyle Owen


From: Hank [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 21, 2008 1:43 AM
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] silent URL redirect/cloak with
mod_rewrite


Hello All,
 
I've tried about 100 combinations and searched google over and
over, but I can't find nor figure out how to do this simple task.
 
I have one webserver with sites at:
 
/home/user/public_html/  ( http://basedomain.com
  site points here) 
/home/user/public_html/siteA
/home/user/public_html/siteB
 
I have domain names like this:  http://domainA.com
  and http://domainB.com   
 
I want to *silently* redirect http://domainA.com
  to  /home/user/public_html/siteA 
and http://domainB.com   to
/home/user/public_html/siteB
 
Now keep in mind the literals "domainA" is not the same as the
directory name "siteA", and same for domainA/siteA.
 
I have found several ways to non-silently redirect
http://domainA.com   to http://basedomain/siteA,
but that's not good enough.  It needs to be a silent re-direct. 
 
I realize I could do this with virtual domains if I had access
to httpd.conf, but I don't on this server.
 
Thanks,
-Hank

If I understand you correctly, you have registered domainA and domainB
and the domain names point to your server's IP in DNS. You want to map
domainA to ../siteA and domainB to ../siteB. You don't have access to
the server's httpd.conf directly and only have access to .htaccess
files. 
 
Then I don't think this is possible. Here's why:
 
The NameVirtualHost mechanism is specifically designed for this
situation, but this has to be used in the main config - it is impossible
to do this in .htaccess. The problem is that although the request (for
domainA, say) might come in with a header like "Host: domainA", without
a NameVirtualHost directive and a corresponding VH, this will be ignored
and the request will go the main docroot.
 
BTW, "redirect" has a very specific meaning in HTTP - it means to send a
301 or 302 redirect response that causes the browser to submit a new
request to a new URL. It is always non-"silent" - ie, the browser
location display shows the new URL. By "silent redirect", I think you
mean proxying - where the server gets content from a new URL and returns
it to the browser without telling it where it came from. That's a
different thing and is never referred to as redirection.
Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.
 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. If you receive this message in 
error, please notify the sender urgently and then immediately delete the 
message and any copies of it from your system. Please also immediately destroy 
any hardcopies of the message. The sender's company reserves the right to 
monitor all e-mail communications through their networks.


[EMAIL PROTECTED] Apache Not Releasing Memory 2.2.0 using Moodle

2008-04-21 Thread Terence Le Grange
Dear All,

I have installed Moodle version 1.8 and am facing problems whereby the
server resources are bring consumed within seconds. Each page request
through http is consuming between 20 and 35 MB RAM. The server works well
for loads of approximately 20 users but at 25 or 30 it just crashes and I
need to restart the httpd process. Current setup is Fedora Core 5 (Apache
2.2.0) with 512 MB of memory.

Looking at TOP, I see that apache is not recycling it's memory (each process
takes up between 1 and 6% and even though it's been idle for some time it
does not seem to recycle it. Memory then stays at about 500MB until such
time as I restart the service and it drops to 230MB (I currently restart the
service hourly which very often fails). A snapshot of my process list is as
follows:

top - 15:46:56 up  4:15,  2 users,  load average: 0.00, 0.03, 0.02
Tasks:  91 total,   1 running,  90 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2% us,  0.0% sy,  0.0% ni, 99.8% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:504156k total,   474812k used,29344k free,28988k buffers
Swap:  1534196k total,0k used,  1534196k free,92952k cached

  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND

 4991 apache16   0 43292  20m 4436 S0  4.1   0:01.37 httpd

 4992 apache15   0 52168  29m 4520 S0  5.9   0:02.11 httpd

 4993 apache15   0 43148  20m 4320 S0  4.1   0:01.25 httpd

 4994 apache15   0 43140  20m 4396 S0  4.1   0:01.82 httpd

 4995 apache16   0 43484  21m 5388 S0  4.3   0:01.66 httpd

 4996 apache17   0 48540  26m 5428 S0  5.4   0:02.57 httpd

 4997 apache15   0 47844  24m 4376 S0  5.0   0:02.31 httpd

 4998 apache15   0 43260  20m 4360 S0  4.1   0:01.70 httpd

 4999 apache15   0 60444  37m 4496 S0  7.5   0:02.38 httpd

 5000 apache15   0 60624  37m 4560 S0  7.6   0:09.21 httpd

 5001 apache16   0 50868  27m 4412 S0  5.6   0:06.82 httpd

 5002 apache15   0 43148  20m 4380 S0  4.1   0:01.89 httpd

 5003 apache16   0 50868  27m 4412 S0  5.6   0:01.58 httpd

 5004 apache15   0 43284  20m 4368 S0  4.1   0:00.55 httpd

 5005 apache16   0 50980  27m 4412 S0  5.6   0:02.21 httpd

 5112 apache15   0 43248  19m 4148 S0  4.0   0:00.47 httpd


I have been tweaking around with the conf file and this is what I currently
have:

KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers   15
MinSpareServers10
MaxSpareServers   20
ServerLimit  512
MaxClients   512
MaxRequestsPerChild  4000


# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers10
MaxClients 256
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 75
MaxRequestsPerChild  4000



I have read the Moodle docs on Apache performance, googled and read the
Apache website for the past week without siginificant improvements when
changing these variables. I also am aware of the significant resources that
Moodle consumes, but would hope that it could at least support 30 users.

I have tried doubling max open files to 100k. (/proc/sys/fs/file-max)


If someone could assist in pointing me in any direction I would greatly
appreciate it.


Kind Regards,

Terence


-
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] How to turn off xml parser on linux apache

2008-04-21 Thread Mika Tapio Tuhkanen
Hi

 

I can't open/read xml-file that is on linux apache server. Xml is valid
(checked) and it can be opened with windows apache. I found that the
solution could be to turn off xml parser but I can't seem to find where
or what config file modify. I need xml file to create flash charts on
web pages.

 

Info:

SERVER_SOFTWARE:  Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.8d Zend
Core/2.5.0 PHP/5.2.5

 

XML example:













 

As said, I can create flash chart from this xml file if I run it on
windows apache.

 

Could someone send guide on how to do this (path to file and how to
modify it). Thanks!

 

Mika



Re: [EMAIL PROTECTED] silent URL redirect/cloak with mod_rewrite

2008-04-21 Thread Krist van Besien
On Mon, Apr 21, 2008 at 1:42 AM, Hank <[EMAIL PROTECTED]> wrote:

> I have found several ways to non-silently redirect http://domainA.com to
> http://basedomain/siteA, but that's not good enough.  It needs to be a
> silent re-direct.

As someone else allready pointed out: There is no such thing as a
"silent" re-direct. What you want is called proxying. The only way I
could imagine doing this would be using rewrite rules.

/home/user/public_html/.htaccess would then have to contain something like this:

RewriteEngine On
RewriteBase /

RewriteCond  $HTTP_HOST   DomainA.com
RewriteRule   ^(.*)$http://basedomain.com/SiteA/$1   [P]

RewriteCond  $HTTP_HOST   DomainB.com
RewriteRule   ^(.*)$http://basedomain.com/SiteB/$1   [P]


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] apache does not preserve user session of tomcat

2008-04-21 Thread Krist van Besien
On Mon, Apr 21, 2008 at 8:57 AM, Melanie Pfefer
<[EMAIL PROTECTED]> wrote:
> hi again,
>
>  I am using apache as a reverse proxy to a tomcat server running ssl. In 
> httpd.conf:
>
>  SSLProxyEngine On
>  SSLProxyCACertificatePath /usr/local/apache2/conf/ssl
>  RewriteRule ^/(abc.*) https://backend:8443/$1 [P,L]
>
>  and url proxying is working.
>  however I noticed that the tomcat user session is not preserved. How to 
> preserve the user session?

That depends. What does tomcat use to preserve the user session? Does
everything work as expected when using the  webapp directly on the
tomcat server?

What it might be is that your webapp sends a cookie, but not with the
right cookiedomain set. In this case the client's browser will not
sent the cookie back, and your webapp won't know who the request comes
from.

Possible solutions:
- Ask the developers to set the correct cookiedomain in the webapp.
- You may need to set the ProxyPassReverseCookieDomain and
ProxyPassReverseCookiePath directives. See:
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreversecookiedomain

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]



[EMAIL PROTECTED] Adding a Header to the httpd response

2008-04-21 Thread Mohammed Salih
Hi All,

How can I add a header, if it is not set by the application.

I want to add Cache-Control header to all http responses, if it is not
set by the back-end application like PHP or application server like
tomcat.

I tried a combination of SetEnvIf and Header, but SetEnvIf is only
fused for requests.

Can any one please guide me in the right path? (Sorrmy English is poor)

Thanks in advance.
Salih

-
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] Adding a Header to the httpd response

2008-04-21 Thread Jeremy Jones
Hi,

Something like this in httpd.conf works for me: 




 
 Header append "Cache-Control" "public"
 
 
 Header append "Cache-Control" "private"
 



so without the LocationMatch it could handle everything I think.


Jeremy




-Original Message-
From: Mohammed Salih [mailto:[EMAIL PROTECTED] 
Sent: 21 April 2008 13:09
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] Adding a Header to the httpd response

Hi All,

How can I add a header, if it is not set by the application.

I want to add Cache-Control header to all http responses, if it is not
set by the back-end application like PHP or application server like
tomcat.

I tried a combination of SetEnvIf and Header, but SetEnvIf is only
fused for requests.

Can any one please guide me in the right path? (Sorrmy English is poor)

Thanks in advance.
Salih

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



This email has been scanned for viruses and other threats
using Newsquest's Ironport email filters

This e-mail, including any attachment, is private and
confidential. 
It should not be read, copied, disclosed or otherwise used by
any person other than the intended recipient(s).
If you have received this e-mail in error, please notify the
sender immediately.
Newsquest reserves the right to monitor e-mails in
accordance with the Telecommunications (Lawful Business
Practice)
(Interception of Communications) Regulations 2000.
 
Newsquest Limited. 
Registered in England, number 3105111 .  Registered office:
58 Church Street, Weybridge, Surrey KT13 8DP


-
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] Apache Not Releasing Memory 2.2.0 using Moodle

2008-04-21 Thread Arnab Ganguly
Hi All,
Can you tell me what is the output you get when you run the free -m
command.Also when the process is idle it won't release the memory back.I
guess it will be put in the Swap space of OS.top -p pid won't be coming
down.

Also I see from the configuration file both perfork and worker is being used
is it so?I am not clear about the configuration.Are you getting any crash on
the Apache?
Thanks
-A

On Mon, Apr 21, 2008 at 1:21 PM, Terence Le Grange <[EMAIL PROTECTED]>
wrote:

> Dear All,
>
> I have installed Moodle version 1.8 and am facing problems whereby the
> server resources are bring consumed within seconds. Each page request
> through http is consuming between 20 and 35 MB RAM. The server works well
> for loads of approximately 20 users but at 25 or 30 it just crashes and I
> need to restart the httpd process. Current setup is Fedora Core 5 (Apache
> 2.2.0) with 512 MB of memory.
>
> Looking at TOP, I see that apache is not recycling it's memory (each
> process
> takes up between 1 and 6% and even though it's been idle for some time it
> does not seem to recycle it. Memory then stays at about 500MB until such
> time as I restart the service and it drops to 230MB (I currently restart
> the
> service hourly which very often fails). A snapshot of my process list is
> as
> follows:
>
> top - 15:46:56 up  4:15,  2 users,  load average: 0.00, 0.03, 0.02
> Tasks:  91 total,   1 running,  90 sleeping,   0 stopped,   0 zombie
> Cpu(s):  0.2% us,  0.0% sy,  0.0% ni, 99.8% id,  0.0% wa,  0.0% hi,  0.0%
> si
> Mem:504156k total,   474812k used,29344k free,28988k buffers
> Swap:  1534196k total,0k used,  1534196k free,92952k cached
>
>  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
>
>  4991 apache16   0 43292  20m 4436 S0  4.1   0:01.37 httpd
>
>  4992 apache15   0 52168  29m 4520 S0  5.9   0:02.11 httpd
>
>  4993 apache15   0 43148  20m 4320 S0  4.1   0:01.25 httpd
>
>  4994 apache15   0 43140  20m 4396 S0  4.1   0:01.82 httpd
>
>  4995 apache16   0 43484  21m 5388 S0  4.3   0:01.66 httpd
>
>  4996 apache17   0 48540  26m 5428 S0  5.4   0:02.57 httpd
>
>  4997 apache15   0 47844  24m 4376 S0  5.0   0:02.31 httpd
>
>  4998 apache15   0 43260  20m 4360 S0  4.1   0:01.70 httpd
>
>  4999 apache15   0 60444  37m 4496 S0  7.5   0:02.38 httpd
>
>  5000 apache15   0 60624  37m 4560 S0  7.6   0:09.21 httpd
>
>  5001 apache16   0 50868  27m 4412 S0  5.6   0:06.82 httpd
>
>  5002 apache15   0 43148  20m 4380 S0  4.1   0:01.89 httpd
>
>  5003 apache16   0 50868  27m 4412 S0  5.6   0:01.58 httpd
>
>  5004 apache15   0 43284  20m 4368 S0  4.1   0:00.55 httpd
>
>  5005 apache16   0 50980  27m 4412 S0  5.6   0:02.21 httpd
>
>  5112 apache15   0 43248  19m 4148 S0  4.0   0:00.47 httpd
>
>
> I have been tweaking around with the conf file and this is what I
> currently
> have:
>
> KeepAlive On
>
> #
> # MaxKeepAliveRequests: The maximum number of requests to allow
> # during a persistent connection. Set to 0 to allow an unlimited amount.
> # We recommend you leave this number high, for maximum performance.
> #
> MaxKeepAliveRequests 100
>
> #
> # KeepAliveTimeout: Number of seconds to wait for the next request from
> the
> # same client on the same connection.
> #
> KeepAliveTimeout 5
>
> ##
> ## Server-Pool Size Regulation (MPM specific)
> ##
>
> # prefork MPM
> # StartServers: number of server processes to start
> # MinSpareServers: minimum number of server processes which are kept spare
> # MaxSpareServers: maximum number of server processes which are kept spare
> # ServerLimit: maximum value for MaxClients for the lifetime of the server
> # MaxClients: maximum number of server processes allowed to start
> # MaxRequestsPerChild: maximum number of requests a server process serves
> 
> StartServers   15
> MinSpareServers10
> MaxSpareServers   20
> ServerLimit  512
> MaxClients   512
> MaxRequestsPerChild  4000
> 
>
> # worker MPM
> # StartServers: initial number of server processes to start
> # MaxClients: maximum number of simultaneous client connections
> # MinSpareThreads: minimum number of worker threads which are kept spare
> # MaxSpareThreads: maximum number of worker threads which are kept spare
> # ThreadsPerChild: constant number of worker threads in each server
> process
> # MaxRequestsPerChild: maximum number of requests a server process serves
> 
> StartServers10
> MaxClients 256
> MinSpareThreads 25
> MaxSpareThreads 75
> ThreadsPerChild 75
> MaxRequestsPerChild  4000
> 
>
>
> I have read the Moodle docs on Apache performance, googled and read the
> Apache website for the past week without siginificant improvements when
> changing these variables. I also am aware of the significant resources
> that
> Moodle consumes, but would hope that it could at least support 30 users.
>
> I have tried doubling m

AW: [EMAIL PROTECTED] Adding a Header to the httpd response

2008-04-21 Thread christian.folini
Hey Salih,

You should use mod_headers.
http://httpd.apache.org/docs/2.2/mod/mod_headers.html 

Cheers,

Christian

-Ursprüngliche Nachricht-
Von: Mohammed Salih [mailto:[EMAIL PROTECTED] 
Gesendet: Montag, 21. April 2008 14:09
An: users@httpd.apache.org
Betreff: [EMAIL PROTECTED] Adding a Header to the httpd response


Hi All,

How can I add a header, if it is not set by the application.

I want to add Cache-Control header to all http responses, if it is not set by 
the back-end application like PHP or application server like tomcat.

I tried a combination of SetEnvIf and Header, but SetEnvIf is only fused for 
requests.

Can any one please guide me in the right path? (Sorrmy English is poor)

Thanks in advance.
Salih

-
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] apache does not preserve user session of tomcat

2008-04-21 Thread Melanie Pfefer
Hi Krist,

Tomcat sends session ids in cookies to the user. The developers haven’t set any 
domain values. They are just using tomcat as is. 

Everything works as expected when using the webapp directly on the tomcat 
server.

Before editing httpd.conf, on the tomcat side: how to set the correct 
cookiedomain in the webapp?

Thanks.



--- On Mon, 21/4/08, Krist van Besien <[EMAIL PROTECTED]> wrote:

> From: Krist van Besien <[EMAIL PROTECTED]>
> Subject: Re: [EMAIL PROTECTED] apache does not preserve user session of tomcat
> To: users@httpd.apache.org, [EMAIL PROTECTED]
> Date: Monday, 21 April, 2008, 2:32 PM
> On Mon, Apr 21, 2008 at 8:57 AM, Melanie Pfefer
> <[EMAIL PROTECTED]> wrote:
> > hi again,
> >
> >  I am using apache as a reverse proxy to a tomcat
> server running ssl. In httpd.conf:
> >
> >  SSLProxyEngine On
> >  SSLProxyCACertificatePath /usr/local/apache2/conf/ssl
> >  RewriteRule ^/(abc.*) https://backend:8443/$1 [P,L]
> >
> >  and url proxying is working.
> >  however I noticed that the tomcat user session is not
> preserved. How to preserve the user session?
> 
> That depends. What does tomcat use to preserve the user
> session? Does
> everything work as expected when using the  webapp directly
> on the
> tomcat server?
> 
> What it might be is that your webapp sends a cookie, but
> not with the
> right cookiedomain set. In this case the client's
> browser will not
> sent the cookie back, and your webapp won't know who
> the request comes
> from.
> 
> Possible solutions:
> - Ask the developers to set the correct cookiedomain in the
> webapp.
> - You may need to set the ProxyPassReverseCookieDomain and
> ProxyPassReverseCookiePath directives. See:
> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreversecookiedomain
> 
> 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]


  __
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.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]



[EMAIL PROTECTED] mod_rewrite: PATH_INFO gets injected with each Rule

2008-04-21 Thread Aleksander Budzynowski
Hi,

The behaviour I'm seeing resemebles the bug described here:
http://archive.apache.org/gnats/7879 Reportedly it was fixed in
2.0.30.However, testing under both 2.2.3 and 2.0.61 I get the same
sort of problem.

Essentially, PATH_INFO is appended to the end of the URI before each
RewriteRule is processed. If more than one RewriteRule match, you can end up
with redundant garbage at the end of the URI.

Let's consider a rule designed to turn all underscores into hyphens (done in
a per-directory context, i.e. .htaccess file):

RewriteEngine On
#Convert _ to - (N flag ensures that all underscores get converted)
RewriteRule ^(.*)_(.*) $1-$2 [N]

It seems innocent enough. But issue a request for

/_f_o_o_/bar

(where _f_o_o_ does not exist, placing '/bar' in PATH_INFO), and this gets
rewritten to /-f-o-o-/bar/bar/bar/bar!

If you request /foo/_bar (assuming foo does not exist), then each new _bar
will feed an extra underscore back into the mix, creating an infinite loop -
even worse.


In the RewriteLog, one sees something like this before the application of
each RewriteRule:

add path-info postfix: /rewritebase/_f_o_o_ -> /rewritebase/_f_o_o_/bar

although each time it accumulates an extra '/bar'.


This doesn't look right to me. Is it a bug? Or have I missed something
obvious?

Thanks,

Aleks


Re: [EMAIL PROTECTED] apache does not preserve user session of tomcat

2008-04-21 Thread Krist van Besien
On Mon, Apr 21, 2008 at 2:21 PM, Melanie Pfefer
<[EMAIL PROTECTED]> wrote:

>  Before editing httpd.conf, on the tomcat side: how to set the correct 
> cookiedomain in the webapp?

How to set this in the webapp I can't know, as I'm not a webapp
specialist. But I have to deal with similar problems you have all the
time.
What I'd suggest is look at what exactly the server sends, and what
the browser does with it. You can use firefox, and an extension like
LiveHTTPHeaders to see exactly what gets send by the server and by the
browser. This will allow to see what the cookie looks like that gets
sent.
There is another thing I remembered. You are proxying http to https.
Now it is possible that the cookie that your tomcat generates (and
passes to the browser) is a "secure" cookie. Some java webapps do this
by default if accessed over https. A browser will never send such a
cookie over a non-secure connection. So if you access your webapp via
your apache server the browser gets it's cookie, but never sends it
back, on subsequent requests, so the session info gets lost. You can
verify this using LiveHTTPHeaders.

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] Adding a Header to the httpd response

2008-04-21 Thread Mohammed Salih
Thank you all for your reply.

Yes I am using Header to set the Cache-Control header. and it is doing
it job. but some times the application might have already set this
header. So I want to avoid setting it again using the Header module.

Thanks again in advance.

On Mon, Apr 21, 2008 at 4:18 PM, Jeremy Jones <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  Something like this in httpd.conf works for me:
>
>
>
> 
>  
>  Header append "Cache-Control" "public"
>  
>  
>  Header append "Cache-Control" "private"
>  
> 
>
>
>  so without the LocationMatch it could handle everything I think.
>
>
>  Jeremy
>
>
>
>
>
>
>  -Original Message-
>  From: Mohammed Salih [mailto:[EMAIL PROTECTED]
>  Sent: 21 April 2008 13:09
>  To: users@httpd.apache.org
>  Subject: [EMAIL PROTECTED] Adding a Header to the httpd response
>
>  Hi All,
>
>  How can I add a header, if it is not set by the application.
>
>  I want to add Cache-Control header to all http responses, if it is not
>  set by the back-end application like PHP or application server like
>  tomcat.
>
>  I tried a combination of SetEnvIf and Header, but SetEnvIf is only
>  fused for requests.
>
>  Can any one please guide me in the right path? (Sorrmy English is poor)
>
>  Thanks in advance.
>  Salih
>
>  -
>  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]
>
>
>  
>  This email has been scanned for viruses and other threats
>  using Newsquest's Ironport email filters
>
>  This e-mail, including any attachment, is private and
>  confidential.
>  It should not be read, copied, disclosed or otherwise used by
>  any person other than the intended recipient(s).
>  If you have received this e-mail in error, please notify the
>  sender immediately.
>  Newsquest reserves the right to monitor e-mails in
>  accordance with the Telecommunications (Lawful Business
>  Practice)
>  (Interception of Communications) Regulations 2000.
>
>  Newsquest Limited.
>  Registered in England, number 3105111 .  Registered office:
>  58 Church Street, Weybridge, Surrey KT13 8DP
>  
>
>  -
>  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] silent URL redirect/cloak with mod_rewrite

2008-04-21 Thread Hank
n Mon, Apr 21, 2008 at 3:04 AM, Boyle Owen <[EMAIL PROTECTED]> wrote:

>--
>  understand you correctly, you have registered domainA and domainB and the
> domain names point to your server's IP in DNS. You want to map domainA to
> ../siteA and domainB to ../siteB. You don't have access to the server's
> httpd.conf directly and only have access to .htaccess files.
>
>  Owen,
>
  Thanks for your response.. yes, that is exactly what I want to do, and
yes, I meant proxying the requests and not redirecting them -- thanks for
the clarification.

 I've tried many combinations of the following, which I can get to work as a
re-direct, but never a proxy:

RewriteCond  %{HTTP_HOST}   ^domainA.com$
RewriteRule   ^(.*)$  http://basedomain.com/siteA/$1   [P]
WIth a [P] option, I get a 404 error.  With a [L] option, I get a redirect
but the domain changes to basedomain.com/siteA and not domainA.com/.

I've tried

RewriteCond  %{HTTP_HOST}   ^domainA.com$
RewriteRule   ^(.*)$  /home/user/public_html/siteA/$1  [P]

with both [L] and [P] and it still won't work like I want it to.

I guess I'm surprised I can't get mod_rewrite to silently proxy a call to
domainA.com to basedomain.com/siteA .  I'll guess I'll write a little PHP
script to do it for me if I can't get mod_rewrite to do it for me.

thanks,

-Hank


Re: [EMAIL PROTECTED] apache does not preserve user session of tomcat

2008-04-21 Thread Melanie Pfefer
hi Krist,


In LiveHTTPHeaders:

Set-Cookie: JSESSIONID=2637CA3EADF9422597DF276AE1846E55; Path=/abc; Secure

So I guess this means that the session is "secure". and from what you have 
said, the brwoser cannot send this cookie over http.

If the above reasoning is true, what are the alternatives?
thanks in advance



--- On Mon, 21/4/08, Krist van Besien <[EMAIL PROTECTED]> wrote:

> From: Krist van Besien <[EMAIL PROTECTED]>
> Subject: Re: [EMAIL PROTECTED] apache does not preserve user session of tomcat
> To: users@httpd.apache.org, [EMAIL PROTECTED]
> Date: Monday, 21 April, 2008, 4:09 PM
> On Mon, Apr 21, 2008 at 2:21 PM, Melanie Pfefer
> <[EMAIL PROTECTED]> wrote:
> 
> >  Before editing httpd.conf, on the tomcat side: how to
> set the correct cookiedomain in the webapp?
> 
> How to set this in the webapp I can't know, as I'm
> not a webapp
> specialist. But I have to deal with similar problems you
> have all the
> time.
> What I'd suggest is look at what exactly the server
> sends, and what
> the browser does with it. You can use firefox, and an
> extension like
> LiveHTTPHeaders to see exactly what gets send by the server
> and by the
> browser. This will allow to see what the cookie looks like
> that gets
> sent.
> There is another thing I remembered. You are proxying http
> to https.
> Now it is possible that the cookie that your tomcat
> generates (and
> passes to the browser) is a "secure" cookie. Some
> java webapps do this
> by default if accessed over https. A browser will never
> send such a
> cookie over a non-secure connection. So if you access your
> webapp via
> your apache server the browser gets it's cookie, but
> never sends it
> back, on subsequent requests, so the session info gets
> lost. You can
> verify this using LiveHTTPHeaders.
> 
> 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]


  __
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.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] silent URL redirect/cloak with mod_rewrite

2008-04-21 Thread Joshua Slive
On Mon, Apr 21, 2008 at 10:04 AM, Hank <[EMAIL PROTECTED]> wrote:
> n Mon, Apr 21, 2008 at 3:04 AM, Boyle Owen <[EMAIL PROTECTED]> wrote:

>
> >  understand you correctly, you have registered domainA and domainB and the
> domain names point to your server's IP in DNS. You want to map domainA to
> ../siteA and domainB to ../siteB. You don't have access to the server's
> httpd.conf directly and only have access to .htaccess files.
>
>  Owen,
>   Thanks for your response.. yes, that is exactly what I want to do, and
> yes, I meant proxying the requests and not redirecting them -- thanks for
> the clarification.
>
>  I've tried many combinations of the following, which I can get to work as a
> re-direct, but never a proxy:
>
> RewriteCond  %{HTTP_HOST}   ^domainA.com$
> RewriteRule   ^(.*)$  http://basedomain.com/siteA/$1   [P]
>
> WIth a [P] option, I get a 404 error.  With a [L] option, I get a redirect
> but the domain changes to basedomain.com/siteA and not domainA.com/.
>
> I've tried
>
> RewriteCond  %{HTTP_HOST}   ^domainA.com$
> RewriteRule   ^(.*)$  /home/user/public_html/siteA/$1  [P]
>
> with both [L] and [P] and it still won't work like I want it to.
>
> I guess I'm surprised I can't get mod_rewrite to silently proxy a call to
> domainA.com to basedomain.com/siteA .  I'll guess I'll write a little PHP
> script to do it for me if I can't get mod_rewrite to do it for me.

If the content is living on the same server as domainA.com (which it
apparently is in this case), then you don't want to proxy. There is no
need to create an additional HTTP request. You just instruct apache to
grab the file directly. So you want something like

RewriteCond  %{HTTP_HOST}   ^domainA.com$
RewriteRule   ^(.*)$  /home/user/public_html/siteA/$1

If this doesn't work, tell us EXACTLY what happens: what do you see in
the browser, error_log, and access_log?

If you still can't figure it out, you'll need to use the RewriteLog.
Since you only have access to .htaccess on the live server, you'll
need to setup a test server where you can manipulate httpd.conf in
order to activate the RewriteLog.

Joshua.

-
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] Adding a Header to the httpd response

2008-04-21 Thread Joshua Slive
On Mon, Apr 21, 2008 at 9:38 AM, Mohammed Salih <[EMAIL PROTECTED]> wrote:
> Thank you all for your reply.
>
>  Yes I am using Header to set the Cache-Control header. and it is doing
>  it job. but some times the application might have already set this
>  header. So I want to avoid setting it again using the Header module.
>

See example #4:
http://httpd.apache.org/docs/2.2/mod/mod_headers.html#examples

SetEnvIf Cache-Control .+ got-cache-control=1
Header set Cache-Control blah env=!got-cache-control

Joshua.

-
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 turn off xml parser on linux apache

2008-04-21 Thread Joshua Slive
On Mon, Apr 21, 2008 at 7:12 AM, Mika Tapio Tuhkanen
<[EMAIL PROTECTED]> wrote:

> I can't open/read xml-file that is on linux apache server. Xml is valid
> (checked) and it can be opened with windows apache. I found that the
> solution could be to turn off xml parser but I can't seem to find where or
> what config file modify. I need xml file to create flash charts on web
> pages.

Apache does not do any xml parsing of output content by default. So
either you have some third-party module configured to parse xml, or
you are misdiagnosing the problem in some other way.

Perhaps if you told us exactly what you were seeing when you try to
request the xml file, including relevant access and error log
messages, we might have more ideas.

Joshua.

-
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: Proxy Error

2008-04-21 Thread Joshua Slive
On Mon, Apr 21, 2008 at 12:12 AM, Parag Dhanuka <[EMAIL PROTECTED]> wrote:
> Please help someone... The problem is happening every 3 hrs on a live server
> :( I have writen some script to handle this but cannot really sleep till
> this is fix
>
> Besides I also tried connecting locally to the tomcat instance using wget
> localhost:8091 and interestingly the wget just hung without any response
> from tomcat Is this some weird tomcat issue which I cannot look into
> It is not tht my instance is heavily loaded as it happened also at a time
> when traffic was really very low :(

I can't give you much help on this, but if tomcat is not responding to
HTTP requests, then the problem is with tomcat and not with apache
httpd. Perhaps you'd have better luck asking for debugging help on a
tomcat list.

Joshua.

-
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] Adding a Header to the httpd response

2008-04-21 Thread Joshua Slive
On Mon, Apr 21, 2008 at 10:34 AM, Joshua Slive <[EMAIL PROTECTED]> wrote:
> On Mon, Apr 21, 2008 at 9:38 AM, Mohammed Salih <[EMAIL PROTECTED]> wrote:
>  > Thank you all for your reply.
>  >
>  >  Yes I am using Header to set the Cache-Control header. and it is doing
>  >  it job. but some times the application might have already set this
>  >  header. So I want to avoid setting it again using the Header module.
>  >
>
>  See example #4:
>  http://httpd.apache.org/docs/2.2/mod/mod_headers.html#examples
>
>  SetEnvIf Cache-Control .+ got-cache-control=1
>  Header set Cache-Control blah env=!got-cache-control

Oh, wait a sec. That's not going to work because SetEnvIf matches
request headers, not response headers.

You could try "Header edit" using a negative-lookahead regex to
exclude requests already containing something in Cache-Control. Other
than that, I think this would require a simple custom module.

Joshua.

-
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] silent URL redirect/cloak with mod_rewrite

2008-04-21 Thread Hank
If the content is living on the same server as domainA.com (which it
apparently is in this case), then you don't want to proxy. There is no
need to create an additional HTTP request. You just instruct apache to
grab the file directly. So you want something like

>
> RewriteCond  %{HTTP_HOST}   ^domainA.com$
> RewriteRule   ^(.*)$  /home/user/public_html/siteA/$1
>
> If this doesn't work, tell us EXACTLY what happens: what do you see in
> the browser, error_log, and access_log?
>

I tried exactly that, and I'm getting an Error 500 (Internal server error).
I'll have to do more testing to figure out exactly what the problem is later
this afternoon.  Thanks for the assistance.

-Hank


Re: [EMAIL PROTECTED] Re: Proxy Error

2008-04-21 Thread Parag Dhanuka
THis however happens after I get tonnes of

[client 66.249.85.88] proxy: error reading status line from remote server

What can this error mean as tomcat logs are not showing any errors
whatsoever :(



On Mon, Apr 21, 2008 at 8:08 PM, Joshua Slive <[EMAIL PROTECTED]> wrote:

> On Mon, Apr 21, 2008 at 12:12 AM, Parag Dhanuka <[EMAIL PROTECTED]>
> wrote:
> > Please help someone... The problem is happening every 3 hrs on a live
> server
> > :( I have writen some script to handle this but cannot really sleep
> till
> > this is fix
> >
> > Besides I also tried connecting locally to the tomcat instance using
> wget
> > localhost:8091 and interestingly the wget just hung without any response
> > from tomcat Is this some weird tomcat issue which I cannot look
> into
> > It is not tht my instance is heavily loaded as it happened also at a
> time
> > when traffic was really very low :(
>
> I can't give you much help on this, but if tomcat is not responding to
> HTTP requests, then the problem is with tomcat and not with apache
> httpd. Perhaps you'd have better luck asking for debugging help on a
> tomcat list.
>
> Joshua.
>
> -
> 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]
>
>


-- 
Parag Dhanuka


Re: [EMAIL PROTECTED] Re: Proxy Error

2008-04-21 Thread Joshua Slive
On Mon, Apr 21, 2008 at 11:24 AM, Parag Dhanuka <[EMAIL PROTECTED]> wrote:
> THis however happens after I get tonnes of
>
> [client 66.249.85.88] proxy: error reading status line from remote server
>
> What can this error mean as tomcat logs are not showing any errors
> whatsoever :(

That's probably just a symptom of httpd being unable to connect to tomcat.

Joshua.

-
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: Proxy Error

2008-04-21 Thread Parag Dhanuka
Ok will start stress test on tomcat its just tht I have low CPU and mem
usage showing <10% but still thanks for the reply have been in a
mess
:(

On Mon, Apr 21, 2008 at 8:58 PM, Joshua Slive <[EMAIL PROTECTED]> wrote:

> On Mon, Apr 21, 2008 at 11:24 AM, Parag Dhanuka <[EMAIL PROTECTED]>
> wrote:
> > THis however happens after I get tonnes of
> >
> > [client 66.249.85.88] proxy: error reading status line from remote
> server
> >
> > What can this error mean as tomcat logs are not showing any errors
> > whatsoever :(
>
> That's probably just a symptom of httpd being unable to connect to tomcat.
>
> Joshua.
>
> -
> 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]
>
>


-- 
Parag Dhanuka


Re: [EMAIL PROTECTED] apache does not preserve user session of tomcat

2008-04-21 Thread Krist van Besien
On Mon, Apr 21, 2008 at 4:16 PM, Melanie Pfefer
<[EMAIL PROTECTED]> wrote:
> hi Krist,
>
>
>  In LiveHTTPHeaders:
>
>  Set-Cookie: JSESSIONID=2637CA3EADF9422597DF276AE1846E55; Path=/abc; Secure
>
>  So I guess this means that the session is "secure". and from what you have 
> said, the brwoser cannot send this cookie over http.

The browser will indeed not send this cookie back to the server, and
thus the session is lost. I do not know of any solution other than
configuring your webapp not to send "secure" cookies... But maybe
someone else has an idea.

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] apache does not preserve user session of tomcat

2008-04-21 Thread Melanie Pfefer
or should I install ssl on apache? this way, the secure cookie will go to ssl 
channel also. Will it solve the problem?
thx


--- On Mon, 21/4/08, Krist van Besien <[EMAIL PROTECTED]> wrote:

> From: Krist van Besien <[EMAIL PROTECTED]>
> Subject: Re: [EMAIL PROTECTED] apache does not preserve user session of tomcat
> To: users@httpd.apache.org, [EMAIL PROTECTED]
> Date: Monday, 21 April, 2008, 6:55 PM
> On Mon, Apr 21, 2008 at 4:16 PM, Melanie Pfefer
> <[EMAIL PROTECTED]> wrote:
> > hi Krist,
> >
> >
> >  In LiveHTTPHeaders:
> >
> >  Set-Cookie:
> JSESSIONID=2637CA3EADF9422597DF276AE1846E55; Path=/abc;
> Secure
> >
> >  So I guess this means that the session is
> "secure". and from what you have said, the
> brwoser cannot send this cookie over http.
> 
> The browser will indeed not send this cookie back to the
> server, and
> thus the session is lost. I do not know of any solution
> other than
> configuring your webapp not to send "secure"
> cookies... But maybe
> someone else has an idea.
> 
> 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]


  __
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.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]



[EMAIL PROTECTED] Apache 2.2.8 mod_ssl Vulnerability Notification Assistance

2008-04-21 Thread Mark A Christofferson
Hello,

 

I have asked this question previously on both the FreeBSD Mailing List
and the mod_ssl mailing list, but didn't receive a response.

 

I am currently running the Apache 2.2.8 port on the FreeBSD 6.3 platform
with mod_ssl enabled.  I received the following vulnerability scan
results from my organization:

 

Vulnerability:  mod_ssl Off-By-One HTAccess Buffer Overflow
Vulnerability

Risk Level:

Signature Group: Safe

Description: The remote host is using a version of mod_ssl which is
older than 2.8.10. This version is vulnerable

to an off by one buffer overflow, which may allow a user with write
access to .htaccess files to

execute arbitrary code on the system with permissions of the web server.

Resolution: Fixes have been made available by the affected vendor. We
recommend upgrading mod_ssl to a

more recent version that contains fixes addressing this issue.

BugTraq: 5084

CVE: CVE-2002-0653

CVSS: 4.9

 

I referenced CVE-2002-0653, noting that it is from 2002, and noticed
that there is no mention of this vulnerability affecting any version of
apache paired with mod_ssl in the 2.x branches.  I also can't find a
version 2.8.10 or greater for Apache 2.2.8.  I did find a site that
mentioned certain distributions patched the apache software so that this
vulnerability is no longer a concern.  

 

Could anyone give me some insight on this issue?  Is there a document I
overlooked that outlines remedial procedures, an updated ssl module, or
has the software been patched to negate the vulnerability?

 

I greatly appreciate any assistance on this matter,

 

Mark



Re: [EMAIL PROTECTED] Apache 2.2.8 mod_ssl Vulnerability Notification Assistance

2008-04-21 Thread Joshua Slive
On Mon, Apr 21, 2008 at 1:02 PM, Mark A Christofferson <[EMAIL PROTECTED]> 
wrote:

> I am currently running the Apache 2.2.8 port on the FreeBSD 6.3 platform
> with mod_ssl enabled.  I received the following vulnerability scan results
> from my organization:
>
>
>
> Vulnerability:  mod_ssl Off-By-One HTAccess Buffer Overflow Vulnerability
>
> Risk Level:
>
> Signature Group: Safe
>
> Description: The remote host is using a version of mod_ssl which is older
> than 2.8.10. This version is vulnerable

The mod_ssl in apache httpd 2.x is not the same as the one used in 1.3
(although the former was originally based on the latter). The bug in
question never existed in 2.x.

Joshua.

-
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] apache does not preserve user session of tomcat

2008-04-21 Thread Krist van Besien
On Mon, Apr 21, 2008 at 6:26 PM, Melanie Pfefer
<[EMAIL PROTECTED]> wrote:
> or should I install ssl on apache? this way, the secure cookie will go to ssl 
> channel also. Will it solve the problem?

Ofcourse you can configure your apache server to use ssl. This will
probably solve your problem. But I thought that you needed to convert
http to https for some reason.

Normally one would run the tomcat server in http only, and leave https
entirely to the apache server. This is a lot easier to configure.

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]



[EMAIL PROTECTED] Log question

2008-04-21 Thread j k
I'm trying to track down the source of some mysql requests coming from
apache.
Output from our server is blocked by the firewall and I can see from the
firewall logs that every couple of hours Apache is trying to connect to port
3306 (mysql) on a remote server.

I have LogLevel set at warn and don't see any related failures in the error
logs.

>From searching it seems that  apache logs only incoming requests. I can't
find any reference to logging outgoing requests.
Is there a way to log outgoing requests from apache so I can find the source
of the repeated request?


Thanks.


[EMAIL PROTECTED] Redirection issue in a SSL virtual hose

2008-04-21 Thread John Bourke
Hi,
 
I have some applications which are running under Tomcat, in a directory
called "www".  The Applications are called "Admin" and "Customer".  I use
Apache to redirect and proxy into Tomcat.
 
I want to access my application using several URLS
 
  http://www.company.com/
  https://www.company.com/
 
These should point to  
https://www.company.com/Customer as this is the default customer landing
point.  But also I need to use 
 
  http://www.company.com/Customer
  https://www.company.com/Customer
 
  http://www.company.com/Admin
  https://www.company.com/Admin
 
So I have set up my redirects for http
 

ServerName   www.company.com
RedirectMatch Permanent ^/Customer(.*)
 https://www.company.com/Customer
RedirectMatch Permanent ^/Admin(.*)  
https://www.company.com/Admin
RedirectMatch Permanent ^/$  
https://www.company.com/Customer
RedirectMatch Permanent (.*)$  
https://www.company.com/Customer



ServerName   www.company.com
SSLEngine On
SSLCertificateFile conf/ssl/www.company.com.crt
SSLCertificateKeyFile conf/ssl/www.company.com.key
ProxyRequests Off
AllowCONNECT 443
 

Order deny,allow
Allow from all
ProxyPass  
http://1.2.3.4:8080/www/
ProxyPassReverse  
http://1.2.3.4:8080/www/
ProxyPassReverse /www/

 
DocumentRoot /usr/local/apache2/htdocs


No problem here the http URLs work OK.
 
  http://www.company.com/
  http://www.company.com/Customer
  http://www.company.com/Admin
 
For the https URLs, the following work OK
 
  https://www.company.com/Customer
  https://www.company.com/Admin
 
BUT
 
  https://www.company.com/ 
 
Does not work.  The request. and of course it should not, as we need 
 
  http://1.2.3.4:8080/www/Customer
  http://1.2.3.4:8080/www/Admin
 
For the Tomcat application
 
  https://www.company.com/ 
 
Results in 
 
  http://1.2.3.4:8080/www
 

Which does not point to the Tomcat application.
 
So what I need is some form of URL rewriting or redirection.  I tried adding
a redirect into the SSL virtual host
 

ServerName   www.company.com
RedirectMatch Permanent ^/$  
https://www.company.com/Customer
 
I also tried rewriting.  
 
RewriteEngine on
RewriteRule ^/$ /Customer [R,L]
 
Neither are redirecting or rewriting the request for / into /Customer
 
So my URL of / proxised to  
http://1.2.3.4:8080/www/ and gives me an error as my application is not
there.
 
Any suggestions at how to alias/rewrite/redirect/proxy the root to /Customer
?
 
Thanks
 
john
 
 
 


[EMAIL PROTECTED] Relative images and css lost after Rewrite

2008-04-21 Thread Weldon Sams
Hi, I have a question related to losing my styling and images after
performing a Rewrite if anyone has some spare time.

Here below is my scenario.

---

I have a script located at,

http://www.example.com/~user/scripts/list.php

This script accepts a query string of the format,

sort=foo&gn=ABC&dn=XYZ

where ABC and XYZ are of the regular expression form [A-Z]*

I have placed a .htaccess file in /~user/ with the contents,

#
RewriteBase /

### 1st rule: (New URL request form)
### /~user/list/foo/ABC/XYZ
RewriteCond %{REQUEST_URI} list/(foo)/([A-Z]*)/([A-Z]*)$
RewriteRule ^.*$ /~user/scripts/list.php?sort=%1&gn=%2&dn=%3&stoprewrite=1 [L]

### 2nd rule: (Request for the old URL format)
### /~user/scripts/list.php?sort=foo&gn=ABC&dn=XYZ
RewriteCond %{REQUEST_URI} list.php$
RewriteCond %{QUERY_STRING} sort=(foo)&gn=([A-Z]*)&dn=([A-Z]*)
RewriteCond %{QUERY_STRING} !stoprewrite
RewriteRule ^.*$ /~user/list/%1/%2/%3? [R,L]
#

The problem is that I'm losing my CSS styles and images or any links
that are in the HTML which are relative links. Instead of being
relative to /~user/scripts, I supposed they're trying to be relative
to /~user/list/foo/ABC/XYZ

I'm not sure how to phrase the question, but does anyone have an idea
on how to make my URLs be of the form /~user/list/foo/ABC/XYZ but have
the script run from /~user/scripts and all links in the HTML that is
output be relative to /~user/scripts where it was ran from.

I'd like to go to

http://www.example.com/~user/list/foo/ABC/XYZ

instead of

http://www.example.com/~user/scripts/list.php?sort=foo&gn=ABC&dn=XYZ

even though the script will always be located at /~user/scripts/list.php .

Thanks for any help, and I'll be glad to rephrase if I'm not so clear,

Weldon
[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]



[EMAIL PROTECTED] mod_python on httpd 1.3.33

2008-04-21 Thread kalin m

hi all...

i'm having problems when trying to load mod_pyton on 1.3.33

# apachectl start
Syntax error on line 219 of /httpd/conf/httpd.conf:
Cannot load /httpd/libexec/mod_python.so into server: 
/httpd/libexec/mod_python.so: Undefined symbol "pthread_self"


any ideas?

thanks...

-
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] Apache Not Releasing Memory 2.2.0 using Moodle

2008-04-21 Thread Terence Le Grange
Hi,

Here is the output from "free -m"

 total   used   free sharedbuffers cached
Mem:   492485  6  0 97156
-/+ buffers/cache:232259
Swap: 1498 19   1479


What happens is that the process dies, even after issueing a
/etc/rc.d/init.d/https restart - it says [ok] but the process does not start
and I need to reboot. Then it's fine.

Thanks for your help!

Kind Regards,

Terence Le Grange



-Original Message-
From: Arnab Ganguly [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 21, 2008 8:24 PM
To: users@httpd.apache.org
Subject: Re: [EMAIL PROTECTED] Apache Not Releasing Memory 2.2.0 using Moodle

Hi All,
Can you tell me what is the output you get when you run the free -m
command.Also when the process is idle it won't release the memory back.I
guess it will be put in the Swap space of OS.top -p pid won't be coming
down.

Also I see from the configuration file both perfork and worker is being used
is it so?I am not clear about the configuration.Are you getting any crash on
the Apache?
Thanks
-A


On Mon, Apr 21, 2008 at 1:21 PM, Terence Le Grange <[EMAIL PROTECTED]>
wrote:


Dear All,

I have installed Moodle version 1.8 and am facing problems whereby
the
server resources are bring consumed within seconds. Each page
request
through http is consuming between 20 and 35 MB RAM. The server works
well
for loads of approximately 20 users but at 25 or 30 it just crashes
and I
need to restart the httpd process. Current setup is Fedora Core 5
(Apache
2.2.0) with 512 MB of memory.

Looking at TOP, I see that apache is not recycling it's memory (each
process
takes up between 1 and 6% and even though it's been idle for some
time it
does not seem to recycle it. Memory then stays at about 500MB until
such
time as I restart the service and it drops to 230MB (I currently
restart the
service hourly which very often fails). A snapshot of my process
list is as
follows:

top - 15:46:56 up  4:15,  2 users,  load average: 0.00, 0.03, 0.02
Tasks:  91 total,   1 running,  90 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2% us,  0.0% sy,  0.0% ni, 99.8% id,  0.0% wa,  0.0% hi,
0.0% si
Mem:504156k total,   474812k used,29344k free,28988k
buffers
Swap:  1534196k total,0k used,  1534196k free,92952k
cached

 PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND

 4991 apache16   0 43292  20m 4436 S0  4.1   0:01.37 httpd

 4992 apache15   0 52168  29m 4520 S0  5.9   0:02.11 httpd

 4993 apache15   0 43148  20m 4320 S0  4.1   0:01.25 httpd

 4994 apache15   0 43140  20m 4396 S0  4.1   0:01.82 httpd

 4995 apache16   0 43484  21m 5388 S0  4.3   0:01.66 httpd

 4996 apache17   0 48540  26m 5428 S0  5.4   0:02.57 httpd

 4997 apache15   0 47844  24m 4376 S0  5.0   0:02.31 httpd

 4998 apache15   0 43260  20m 4360 S0  4.1   0:01.70 httpd

 4999 apache15   0 60444  37m 4496 S0  7.5   0:02.38 httpd

 5000 apache15   0 60624  37m 4560 S0  7.6   0:09.21 httpd

 5001 apache16   0 50868  27m 4412 S0  5.6   0:06.82 httpd

 5002 apache15   0 43148  20m 4380 S0  4.1   0:01.89 httpd

 5003 apache16   0 50868  27m 4412 S0  5.6   0:01.58 httpd

 5004 apache15   0 43284  20m 4368 S0  4.1   0:00.55 httpd

 5005 apache16   0 50980  27m 4412 S0  5.6   0:02.21 httpd

 5112 apache15   0 43248  19m 4148 S0  4.0   0:00.47 httpd


I have been tweaking around with the conf file and this is what I
currently
have:

KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited
amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request
from the
# same client on the same connection.
#
KeepAliveTimeout 5

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept
spare
# MaxSpareServers: maximum number of server processes which are kept
spare
# ServerLimit: maximum value for MaxClients for the lifetime of the
s

RE: [EMAIL PROTECTED] Relative images and css lost after Rewrite

2008-04-21 Thread Boyle Owen
> -Original Message-
> From: Weldon Sams [mailto:[EMAIL PROTECTED] 
> Sent: Monday, April 21, 2008 10:27 PM
> To: users@httpd.apache.org
> Subject: [EMAIL PROTECTED] Relative images and css lost after Rewrite
> 
> Hi, I have a question related to losing my styling and images after
> performing a Rewrite if anyone has some spare time.
> 
> Here below is my scenario.
> 
> ---
> 
> I have a script located at,
> 
> http://www.example.com/~user/scripts/list.php
> 
> This script accepts a query string of the format,
> 
> sort=foo&gn=ABC&dn=XYZ
> 
> where ABC and XYZ are of the regular expression form [A-Z]*
> 
> I have placed a .htaccess file in /~user/ with the contents,
> 
> #
> RewriteBase /
> 
> ### 1st rule: (New URL request form)
> ### /~user/list/foo/ABC/XYZ
> RewriteCond %{REQUEST_URI} list/(foo)/([A-Z]*)/([A-Z]*)$
> RewriteRule ^.*$ 
> /~user/scripts/list.php?sort=%1&gn=%2&dn=%3&stoprewrite=1 [L]
> 
> ### 2nd rule: (Request for the old URL format)
> ### /~user/scripts/list.php?sort=foo&gn=ABC&dn=XYZ
> RewriteCond %{REQUEST_URI} list.php$
> RewriteCond %{QUERY_STRING} sort=(foo)&gn=([A-Z]*)&dn=([A-Z]*)
> RewriteCond %{QUERY_STRING} !stoprewrite
> RewriteRule ^.*$ /~user/list/%1/%2/%3? [R,L]
> #
> 
> The problem is that I'm losing my CSS styles and images or any links
> that are in the HTML which are relative links. Instead of being
> relative to /~user/scripts, I supposed they're trying to be relative
> to /~user/list/foo/ABC/XYZ
> 
> I'm not sure how to phrase the question, but does anyone have an idea
> on how to make my URLs be of the form /~user/list/foo/ABC/XYZ but have
> the script run from /~user/scripts and all links in the HTML that is
> output be relative to /~user/scripts where it was ran from.
> 
> I'd like to go to
> 
> http://www.example.com/~user/list/foo/ABC/XYZ
> 
> instead of
> 
> http://www.example.com/~user/scripts/list.php?sort=foo&gn=ABC&dn=XYZ
> 
> even though the script will always be located at 
> /~user/scripts/list.php .
> 
> Thanks for any help, and I'll be glad to rephrase if I'm not so clear,

I think the point you are missing is that it is the *browser* that
requests the CSS and images. It does this when it gets the HTML output
back from the cgi script. So if it sees, in the HTML page, an  tag
with src="wibble.png", it will take that URL to be relative to the
URL-path of the current page (www.example.com/~user/list/foo/ABC/) so it
will request www.example.com/~user/list/foo/ABC/wibble.png.

Basically, the browser doesn't know that the apparently static URL was
internally rewritten to a CGI script.

One solution is to use absolute paths in the tags, eg, . Alternatively, move the image and
CSS content from the scripts dir to ~user/list/foo/ABC (if it exists).
Or, move the stuff to independent directories under the docroot and
refer to it using absolute paths, eg src="/images/wibble.png",
src="/styles/myStyle.css" etc.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 



> 
> Weldon
> [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]
>
 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. If you receive this message in 
error, please notify the sender urgently and then immediately delete the 
message and any copies of it from your system. Please also immediately destroy 
any hardcopies of the message. The sender's company reserves the right to 
monitor all e-mail communications through their networks.

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