Re: [us...@httpd] HTTP/0.9 and mod_proxy

2009-10-06 Thread Krist van Besien
On Mon, Oct 5, 2009 at 8:30 PM, Danijel  wrote:
> Krist van Besien wrote:
>> > The tcpdump between Apache and the backend looks like this:
>> >
>> >        GET /test HTTP/1.0
>> >        Host: backend:9110
>> >        User-Agent: curl/7.15.1 (x86_64-suse-linux) libcurl/7.15.1
>> >        OpenSSL/0.9.8a zlib/1.2.3 libidn/0.6.0
>> >        Accept: */*
>> >        Max-Forwards: 10
>> >        X-Forwarded-For: 127.0.0.1
>> >        X-Forwarded-Host: localhost:4080
>> >        X-Forwarded-Server: localhost
>> >
>> >        AS2 Adapter is alive.
>>
>> Your problem is that apache expects a http/1.0 response to an HTTP/1.0
>> request. Because the response does not conform to HTTP/1.0 it is
>> rejected. Thus the 502 error.
>>
>> Apache will proxy HTTP/0.9 just fine. Just repeat your test with a
>> HTTP/0.9 client and you'll see. Apache does not translate between
>> HTTP/1.0 and HTTP/0.9. It would anyway not be easy to do this. So if
>> you send a HTTP/1.0 request to your forward proxy it will forward a
>> HTTP/1.0 request to the backend.
>
> I've done that today. The error is the same.

What does the TCP dump show now?

Krist


-- 
krist.vanbes...@gmail.com
kr...@vanbesien.org
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: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [us...@httpd] Odd site redirection

2009-10-06 Thread Igor Cicimov
I would say something is wrong with your new virtual host definition. It's
not a redirection but since the request doesn't match any virtual host is
being served by the first one in the config file.


On Tue, Oct 6, 2009 at 2:03 AM, Oliver Marshall <
oliver.marsh...@g2support.com> wrote:

>  Hi chaps,
>
>
> Was wondering if someone can help me look at a problem. We've created a new
> virtual host entry on a particular box, which do frequently (once a month or
> so) only this time, when a user goes to the new site, they get directed to
> the first site in the conf file.
>
>
>
> You can type in http://wiggle.mydomain.com and hit enter and you instantly
> get a http://woggle.mydomain.com and the address bar in the browser also
> changes.
>
>
>
> I've tried creating other new virtual host entries with just the absolute
> basic entries and those also show the same issue. I've also tried adding a
> custom log entry for the new vhost sites but the log stays empty.
>
>
>
> There's no .htaccess file involved in either of the sites.
>
>
>
> The new vhost entry looks like this;
>
>
>
> 
>
>  documentroot /var/www/new_site
>
>  servername new_site.mydomain.co.uk
>
> 
>
>
>
> The site that it get's directed to looks like this;
>
>
>
> 
>
> DocumentRoot /var/www/first_site
>
> ServerName first_site.mydomain.co.uk
>
> ServerName first_site.mydomain.com
>
> 
>
> AuthBasicProvider ldap
>
> AuthzLDAPAuthoritative off
>
> AuthLDAPBindDN "CN=LDAP USER,CN=Users,DC=mydomain,DC=local"
>
> AuthLDAPBindPassword ***
>
> AuthLDAPURL
> "ldap://server1/DC=mydomain,DC=local?sAMAccountName?sub?(objectClass=*)"
> NONE
>
> AuthLDAPGroupAttributeIsDN on
>
> require ldap-group CN=Web Users,OU=Security
> Groups,OU=Mydomain LLP,DC=mydomain,DC=local
>
> AuthName "Mydomain First Site"
>
> 
>
> 
>
>
>
> There are lots of other sites on the server and they are working fine, its
> just started happening today. We've also tried using a plain "hello world"
> style index.html file to rule out any meta refresh issue that the coders may
> have put in to the index file. The SVN stuff all works fine, it's just there
> for the sake of accuracy.
>
>
>
> Is there a way to find out whats causing the redirect and/or where they
> redirect is happening ?
>
>
>
> Olly
>
> --
>
> G2 Support
>
> Network Support : Online Backups : Server Management
>


Re: [us...@httpd] Odd site redirection

2009-10-06 Thread Dick Davies
Do you have a

NameVirtualHost *.80

in your apache config somewhere?

On Tue, Oct 6, 2009 at 8:06 AM, Igor Cicimov  wrote:
> I would say something is wrong with your new virtual host definition. It's
> not a redirection but since the request doesn't match any virtual host is
> being served by the first one in the config file.
>
>
> On Tue, Oct 6, 2009 at 2:03 AM, Oliver Marshall
>  wrote:
>>
>> Hi chaps,
>>
>> Was wondering if someone can help me look at a problem. We've created a
>> new virtual host entry on a particular box, which do frequently (once a
>> month or so) only this time, when a user goes to the new site, they get
>> directed to the first site in the conf file.
>>
>>
>>
>> You can type in http://wiggle.mydomain.com and hit enter and you instantly
>> get a http://woggle.mydomain.com and the address bar in the browser also
>> changes.
>>
>>
>>
>> I've tried creating other new virtual host entries with just the absolute
>> basic entries and those also show the same issue. I've also tried adding a
>> custom log entry for the new vhost sites but the log stays empty.
>>
>>
>>
>> There's no .htaccess file involved in either of the sites.
>>
>>
>>
>> The new vhost entry looks like this;
>>
>>
>>
>> 
>>
>>  documentroot /var/www/new_site
>>
>>  servername new_site.mydomain.co.uk
>>
>> 
>>
>>
>>
>> The site that it get's directed to looks like this;
>>
>>
>>
>> 
>>
>>     DocumentRoot /var/www/first_site
>>
>>     ServerName first_site.mydomain.co.uk
>>
>>     ServerName first_site.mydomain.com
>>
>>     
>>
>>     AuthBasicProvider ldap
>>
>>     AuthzLDAPAuthoritative off
>>
>>     AuthLDAPBindDN "CN=LDAP
>> USER,CN=Users,DC=mydomain,DC=local"
>>
>>     AuthLDAPBindPassword ***
>>
>>     AuthLDAPURL
>> "ldap://server1/DC=mydomain,DC=local?sAMAccountName?sub?(objectClass=*)"
>> NONE
>>
>>     AuthLDAPGroupAttributeIsDN on
>>
>>     require ldap-group CN=Web Users,OU=Security
>> Groups,OU=Mydomain LLP,DC=mydomain,DC=local
>>
>>     AuthName "Mydomain First Site"
>>
>>     
>>
>> 
>>
>>
>>
>> There are lots of other sites on the server and they are working fine, its
>> just started happening today. We've also tried using a plain "hello world"
>> style index.html file to rule out any meta refresh issue that the coders may
>> have put in to the index file. The SVN stuff all works fine, it's just there
>> for the sake of accuracy.
>>
>>
>>
>> Is there a way to find out whats causing the redirect and/or where they
>> redirect is happening ?
>>
>>
>>
>> Olly
>>
>> --
>>
>> G2 Support
>>
>> Network Support : Online Backups : Server Management
>

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



[us...@httpd] AUTO: Ryan Watkins/Rochester/IBM is out of the office. (returning 10/14/2009)

2009-10-06 Thread Ryan Watkins

I am out of the office until 10/14/2009.

I am out of the office and will not have access to email and voicemail.  I
will respond to your message when I return.

For assistance with technical issues related to the Apache HTTP server on
IBM i you can contact:

Nadir Amra, or my team leader Tim Rowe.

For urgent issue's please contact my manager Randal Massot.


Note: This is an automated response to your message  "users Digest 6 Oct
2009 07:07:01 - Issue 3669" sent on 10/6/09 2:07:01 AM.

This is the only notification you will receive while this person is away.


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



Re: [us...@httpd] AUTO: Ryan Watkins/Rochester/IBM is out of the office. (returning 10/14/2009)

2009-10-06 Thread André Warnier

Hi.
This is a message from AHUSLSFARTARS (Apache httpd user's support list 
system for automatic replies to automatic reply systems) :


Please unsuscribe before you leave on a holiday.

If you are a human, you do not need to reply to this message.
On the other hand, if you are a machine, are you one of these nifty new 
super-cluster blue things ? If yes, can you drop me a line at 
ahuslsfart...@apache.org ?



Ryan Watkins wrote:

I am out of the office until 10/14/2009.

I am out of the office and will not have access to email and voicemail.  I
will respond to your message when I return.

For assistance with technical issues related to the Apache HTTP server on
IBM i you can contact:

Nadir Amra, or my team leader Tim Rowe.

For urgent issue's please contact my manager Randal Massot.


Note: This is an automated response to your message  "users Digest 6 Oct
2009 07:07:01 - Issue 3669" sent on 10/6/09 2:07:01 AM.

This is the only notification you will receive while this person is away.


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





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



Re: [us...@httpd] Apache issue - Filename format

2009-10-06 Thread Tom Evans
On Tue, 2009-10-06 at 07:30 -0700, bhasker yadav wrote:
> Hi All,
>  
> Can you please have a look at the below issue and give me a solution.
> Also i have attached the screen shots of the issue.
>  
> Thanks.
> 
> --- On Wed, 9/2/09, bhasker yadav 
> wrote:
> 
> 
> From: bhasker yadav 
> Subject: [us...@httpd] Apache issue - Need help
> To: users@httpd.apache.org
> Date: Wednesday, September 2, 2009, 4:24 AM
> 
> Hi All, 
> 
>   
> 
> My application is accessing through apache 2.2 -> weblogic
> 10.3 
> 
>   
> 
> I have a page export to excel icon in a page. 
> 
> When i click on the page i get a save dialog popup and there
> is a filename which i need to get. But i get a
> servletName.xls. 
> 
>   
> 
> But when i access directly from weblogic server it is
> correct. 
> 
> I searched google and came to know that there is setting to be
> done in the conf file, i have done it but no results. 
> 
>   
> 
>  
> 
> ForceType application/octet-stream 
> 
> Header set Content-Disposition attachment 
> 
>  
> 
>   
> 
> other way is 
> 
> - 
> 
>  
> 
> ForceType application/octet-stream 
> 
> Header set Content-Disposition attachment 
> 
>  
> 
>   
> 
> Please let me know the solution. 
> 
>   
> 
>  
> 
> 
> 

FilesMatch matches files. You aren't serving files, you are proxying to
weblogic, therefore there are no files involved. You should use Location
or LocationMatch.

Incidentally, do you think apache is modifying those headers? I am
surprised it is 'correct' from weblogic directly, and then 'incorrect'
after apache has proxied it.

Tom


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



[us...@httpd] mod_rewrite : Can a space in a URL be preserved ?

2009-10-06 Thread ABAPGUY
Hi Apache experts,
I am using Apache 2.0.59 as a Reverse Proxy using mod_rewrite and mod_proxy .
I have a downstream J2EE server that is creating URLs with a space in them . 
How can I use mod_rewrite (which sees %20) to write the space ..instead of %20 ?
 
Regards
Daniel

Re: [us...@httpd] mod_rewrite : Can a space in a URL be preserved ?

2009-10-06 Thread Dick Davies
Spaces aren't valid characters in urls, period. As you say, it URL
encodes to %20,
and I can't imagine any bits of apache (or any other server)
are going to send a space instead, because that breaks the HTTP spec.

On Tue, Oct 6, 2009 at 3:59 PM, ABAPGUY  wrote:
>
> Hi Apache experts,
> I am using Apache 2.0.59 as a Reverse Proxy using mod_rewrite and mod_proxy .
> I have a downstream J2EE server that is creating URLs with a space in them . 
> How can I use mod_rewrite (which sees %20) to write the space ..instead of 
> %20 ?
>
> Regards
> Daniel

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



[us...@httpd] how to avoid duplicating the document root in vhost conf files?

2009-10-06 Thread Brolin Empey
Hello list,

Here is one of my vhost conf files:

[bro...@cowboy] [0] [1] ~/
$ cat /etc/apache2/sites-available/aidsorphanage.org

ServerAdmin bro...@techsol.ca
ServerName aidsorphanage.org
ServerAlias www.aidsorphanage.org aidsorphonage.org
www.aidsorphonage.org

DocumentRoot /var/www/aidsorphanage.org/

#   FIXME: How can I avoid duplicating ${DOCUMENT_ROOT}?
#  - brolin, 2009-09-15

Order Deny,Allow
Deny from All



Options FollowSymLinks
AllowOverride All


ErrorLog /var/www/aidsorphanage.org/logs/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/www/aidsorphanage.org/logs/access.log combined

[bro...@cowboy] [0] [2] ~/

How can I avoid duplicating the document root after it is declared
with the DocumentRoot directive?  In this example, the document root
is duplicated thrice.  Duplication is bad.

I am using apache2 version 2.2.11-2ubuntu2.3.

Thanks,
Brolin

--
Sometimes I forget how to do small talk: 

“If you have to ask why, you’re not a member of the intended
audience.” — Bob Zimbinski, 

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



[us...@httpd] Need help to diagnose a problem with CustomLog

2009-10-06 Thread Bernard Fay
Hi,

I have a weird problem with CustomLog.

I defined an access log in a vhost configuration file.  This site used to
use /var/log/apache2/access_log.  I changed it to use "CustomLog
/var/log/apache2/www.services.cnt.qc/www.services.cnt.qc-access_log
combined"

For some odd reason, when I started Apache it created my desired access log
file but keep writing in /var/log/apache2/access_log.  I did stop and start
Apache2 but without success.

Does soemone know why?

What can be done to diagnose this problem?

I checked the configuration file many times and everything is ok.

Thanks in advance,
Bernard


Re: [us...@httpd] how to avoid duplicating the document root in vhost conf files?

2009-10-06 Thread Jonathan Zuckerman
On Tue, Oct 6, 2009 at 11:37 AM, Brolin Empey  wrote:
> Hello list,
>
> Here is one of my vhost conf files:
>
> [bro...@cowboy] [0] [1] ~/
> $ cat /etc/apache2/sites-available/aidsorphanage.org
> 
>        ServerAdmin bro...@techsol.ca
>        ServerName aidsorphanage.org
>        ServerAlias www.aidsorphanage.org aidsorphonage.org
> www.aidsorphonage.org
>
>        DocumentRoot /var/www/aidsorphanage.org/
>
> #       FIXME: How can I avoid duplicating ${DOCUMENT_ROOT}?
> #              - brolin, 2009-09-15
>        
>                Order Deny,Allow
>                Deny from All
>        
>
>        
>                Options FollowSymLinks
>                AllowOverride All
>        
>
>        ErrorLog /var/www/aidsorphanage.org/logs/error.log
>
>        # Possible values include: debug, info, notice, warn, error, crit,
>        # alert, emerg.
>        LogLevel warn
>
>        CustomLog /var/www/aidsorphanage.org/logs/access.log combined
> 
> [bro...@cowboy] [0] [2] ~/
>
> How can I avoid duplicating the document root after it is declared
> with the DocumentRoot directive?  In this example, the document root
> is duplicated thrice.  Duplication is bad.
>
> I am using apache2 version 2.2.11-2ubuntu2.3.
>
> Thanks,
> Brolin
>
> --
> Sometimes I forget how to do small talk: 
>
> “If you have to ask why, you’re not a member of the intended
> audience.” — Bob Zimbinski, 
>
> -
> 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: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

Am I missing something? I only see the DocumentRoot declared once in
your example

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



Re: [us...@httpd] how to avoid duplicating the document root in vhost conf files?

2009-10-06 Thread Brolin Empey
2009/10/6 Jonathan Zuckerman :
> Am I missing something? I only see the DocumentRoot declared once in
> your example

Yes, there is only 1 DocumentRoot directive, but the
“/var/www/aidsorphanage.org/” part of the /value/ of the DocumentRoot
directive is duplicated thrice.  How can I avoid duplicating this
common part of the paths in the vhost conf file?

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



Re: [us...@httpd] how to avoid duplicating the document root in vhost conf files?

2009-10-06 Thread Jonathan Zuckerman
On Tue, Oct 6, 2009 at 12:30 PM, Brolin Empey  wrote:
> 2009/10/6 Jonathan Zuckerman :
>> Am I missing something? I only see the DocumentRoot declared once in
>> your example
>
> Yes, there is only 1 DocumentRoot directive, but the
> “/var/www/aidsorphanage.org/” part of the /value/ of the DocumentRoot
> directive is duplicated thrice.  How can I avoid duplicating this
> common part of the paths in the vhost conf file?
>
> -
> 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: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

Ah I see... I'm a software engineer too so I appreciate trying to
encapsulate often-used values but I'd say this might be one of those
battles it wouldn't kill you to forfeit.
That said, have you tried using relative paths for the error log path
declarations?  Or (my preferred solution) put them outside the
document root; why bother putting them in the doc root and then making
a directory override to disallow outside access to them when the
simpler solution would be to just put them outside the web root and
never ever worry about access rules.

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



Re: [us...@httpd] how to avoid duplicating the document root in vhost conf files?

2009-10-06 Thread Brolin Empey
2009/10/6 Jonathan Zuckerman :
> Ah I see... I'm a software engineer too so I appreciate trying to
> encapsulate often-used values but I'd say this might be one of those
> battles it wouldn't kill you to forfeit.

I am a hacker, not an engineer. ;)  In any case, I am not a
professional engineer, so I would not call myself an engineer.

Anyway, did you notice my FIXME about avoiding the duplicated paths is
dated 2009-09-15?  I have already deferred publicly asking about this
issue for over half a month because it is a low priority and I am
probably the only person who cares about it, but I am a perfectionist
sometimes, so I want to avoid the duplication.

> That said, have you tried using relative paths for the error log path
> declarations?

No, I have not.  Since the ${DOCUMENT_ROOT} variable exists, why can I
not use it in my vhost conf file? :(

>  Or (my preferred solution) put them outside the
> document root; why bother putting them in the doc root and then making
> a directory override to disallow outside access to them when the
> simpler solution would be to just put them outside the web root and
> never ever worry about access rules.

I know that is a simpler and probably more logical solution, but I
kept the logs under the doc root for at least 2 reasons:

1. The Web howto about configuring apache2 vhosts on Debian/Ubuntu I
used used this config in its examples.  That howto lacks credibility,
though, because it has errors (singular versus plural nouns) in the
paths to the vhost conf files and does not even prevent world/public
access to the logs!  (epic fail)

2. Because my VPS is hosting multiple vhosts, I thought it was tidier
to keep the logs in the doc root.  I know it does not make much sense
because the logs are not public content, but it was an arbitrary
decision:  I had to keep the logs /somewhere/.  Yes, I suppose
/var/log/ is a better home for apache logs than /var/www/.



I mean this completely politely, but you should trim your quotes to
include only relevant text, not entire messages, including signatures
and footers.

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



Re: [us...@httpd] mod_rewrite : Can a space in a URL be preserved ?

2009-10-06 Thread rank1seeker
Maybe if Daniel would edit Apache's source... :)))
Then once his "custom" Apache server is up and running, should notify us 
about it's IP.
So we could have a fun with it ;)


- Original Message -
From: Dick Davies 
To: users@httpd.apache.org
Date: Tue, 6 Oct 2009 16:05:36 +0100
Subject: Re: [us...@httpd] mod_rewrite : Can a space in a URL be preserved ?

> Spaces aren't valid characters in urls, period. As you say, it URL
> encodes to %20,
> and I can't imagine any bits of apache (or any other server)
> are going to send a space instead, because that breaks the HTTP spec.
> 
> On Tue, Oct 6, 2009 at 3:59 PM, ABAPGUY  wrote:
> >
> > Hi Apache experts,
> > I am using Apache 2.0.59 as a Reverse Proxy using mod_rewrite and 
mod_proxy .
> > I have a downstream J2EE server that is creating URLs with a space in 
them . How can I use mod_rewrite (which sees %20) to write the space 
..instead of %20 ?
> >
> > Regards
> > Daniel

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



Re: [us...@httpd] Need help to diagnose a problem with CustomLog

2009-10-06 Thread Igor Cicimov
Have you commented out the /var/log/apache2/access_log line in the main
section of the config file?

On Wed, Oct 7, 2009 at 6:09 AM, Bernard Fay  wrote:

> Hi,
>
> I have a weird problem with CustomLog.
>
> I defined an access log in a vhost configuration file.  This site used to
> use /var/log/apache2/access_log.  I changed it to use "CustomLog
> /var/log/apache2/www.services.cnt.qc/www.services.cnt.qc-access_log
> combined"
>
> For some odd reason, when I started Apache it created my desired access log
> file but keep writing in /var/log/apache2/access_log.  I did stop and start
> Apache2 but without success.
>
> Does soemone know why?
>
> What can be done to diagnose this problem?
>
> I checked the configuration file many times and everything is ok.
>
> Thanks in advance,
> Bernard
>
>


Re: [us...@httpd] apache2 core dump

2009-10-06 Thread Igor Cicimov
Thought to post some more debugging regarding this problem I have.
This time I had help from one of our Unix engineers with the debugging
and you can see he used mdb in this case:

bash-2.05$ mdb core.httpd.28499.wenpweb1.500.500.1253659663

mdb: warning: failed to infer pathname to executable; symbol table
will not be available

Loading modules: [ libc.so.1 libthread.so.1 ld.so.1 ]

> $C (display call stack)

fbef95d8 libapr-1.so.0`apr_palloc+4(44617465, 7, 70740020, 7efefeff,
81010100, ff00)

fbef9648 libapr-1.so.0`apr_pstrdup+0x20(44617465, 27a758, 0, 13f75a4, 0, 27a75a)

fbef96b8 libapr-1.so.0`apr_table_add+0xa8(13f75a0, 27a758, 27a760, 5,
fffc, d)

fbef9728 mod_mem_cache.so`deep_table_copy+0x60(13f75a0, 0, 5, 2ba944, 38, 1)

fbef9798 mod_mem_cache.so`store_headers+0x1c(ecba0, 2797f8, ecba8,
26b900, ecba8, fec522d4)

(snip)

> apr_palloc::dis (disassemble apr_palloc)

libapr-1.so.0`apr_palloc:   save  %sp, -0x70, %sp

libapr-1.so.0`apr_palloc+4: ld[%i0 + 0x2c], %l0

libapr-1.so.0`apr_palloc+8: mov   %i0, %l1

(snip)

> $r (display registers)

(snip)

%o0 = 0x8ca0 %i0 = 0x44617465

(snip)





%i0 (the first parameter being passed to a function) is an invalid
pointer.  Looking at it, it actually appears to be part of a text
string:

0x44 = D

0x61 = a

0x74 = t

0x65 = e



Putting all this together, apr_table_add is dereferencing a string and
passing the contents of it to apr_pstrdup, instead of passing a
pointer to the memory pool (which is what apr_pstrdup expects)



Most likely something in apr_table_add is getting over-written.



Other cores show similar behaviour:



hm...@wenpweb1# mdb core.httpd.28752.wenpweb1.500.500.1254735017

> $C

fcff95d8 libapr-1.so.0`apr_palloc+4(436f6e74 ('Cont'), 7, 70740020,
7efefeff, 81010100, ff00)


bash-2.05# mdb core.httpd.12737.wenpweb1.500.500.1254699635

> $C

fccf96b8 libapr-1.so.0`apr_table_add+0xb4(56f5c10, 527d0f8, 5281740, 5, 1, 6)

> apr_table_add+0xb4::dis

libapr-1.so.0`apr_table_add+0xb4:   st%o0, [%l0]

> $r

%g0 = 0x %l0 = 0x68747470 ('http')


So it really looks like a bug in the apache apr so the patch that Nick
suggested makes more sense for me now.

Nik, do you know if this is the same issue that the patch is suppose
to fix? Can you please point me to the patch release documentation so
I can read some more about it?

Thanks for your help.

Igor

On 9/24/09, Igor Cicimov  wrote:
> Ah forgot about the tool ... used pstack to debug the core dumps since it
> is
> a production server and don't have gdb available.
>
> Cheers,
>
> Igor
>
> On Thu, Sep 24, 2009 at 12:37 PM, Igor Cicimov  wrote:
>
>> Hi Nick,
>>
>> First thanks for your reply much appreciate it.
>>
>> Yes, the server is reverse proxy only and from what I could see from
>> couple
>> of other core dumps they all look the same. First I thought it might be
>> the
>> proxy_html module causing this but now I'm not that sure and might be
>> something more serious.
>>
>> I'll have a look in the patch and see if it is applicable to me.
>>
>> Thanks,
>>
>> Igor
>>
>>
>> On Wed, Sep 23, 2009 at 6:55 PM, Nick Kew  wrote:
>>
>>>
>>> On 23 Sep 2009, at 07:32, Igor Cicimov wrote:
>>>
>>>  Hi all,

 I get the following core dumps from the apache:
 [chop]

 It's apache 2.2.12 running as reverse proxy on Solaris 9 box with
 mpm_worker module. Looks like the threads get in some conditional wait
 state
 and the process becomes zombie. I can see individual child processes
 dieing
 in the log file with segmentation fault.

>>>
>>> What tool produced that dump?  Do you have gdb available?
>>> (a gdb backtrace means more to me than what you show).
>>>
>>> You mention it's a reverse proxy, and the first thread you show is
>>> a proxy request.  Are the crashes always associated with that,
>>> so we could look there for a cause?  Or is that a meaningless
>>> question because the server does nothing else?
>>>
>>> You might also apply Jeff's APR patch at
>>> https://issues.apache.org/bugzilla/attachment.cgi?id=24161
>>> and see if that helps.
>>>
>>> --
>>> 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: users-unsubscr...@httpd.apache.org
>>>  "   from the digest: users-digest-unsubscr...@httpd.apache.org
>>> For additional commands, e-mail: users-h...@httpd.apache.org
>>>
>>>
>>
>

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



Re: [us...@httpd] mod_rewrite : Can a space in a URL be preserved ?

2009-10-06 Thread Jonathan Zuckerman
On Tue, Oct 6, 2009 at 3:25 PM,   wrote:
> Maybe if Daniel would edit Apache's source... :)))
> Then once his "custom" Apache server is up and running, should notify us
> about it's IP.
> So we could have a fun with it ;)
>
>
> - Original Message -
> From: Dick Davies 
> To: users@httpd.apache.org
> Date: Tue, 6 Oct 2009 16:05:36 +0100
> Subject: Re: [us...@httpd] mod_rewrite : Can a space in a URL be preserved ?
>
>> Spaces aren't valid characters in urls, period. As you say, it URL
>> encodes to %20,
>> and I can't imagine any bits of apache (or any other server)
>> are going to send a space instead, because that breaks the HTTP spec.
>>
>> On Tue, Oct 6, 2009 at 3:59 PM, ABAPGUY  wrote:
>> >
>> > Hi Apache experts,
>> > I am using Apache 2.0.59 as a Reverse Proxy using mod_rewrite and
> mod_proxy .
>> > I have a downstream J2EE server that is creating URLs with a space in
> them . How can I use mod_rewrite (which sees %20) to write the space
> ..instead of %20 ?
>> >
>> > Regards
>> > Daniel
>
> -
> 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: users-unsubscr...@httpd.apache.org
>   "   from the digest: users-digest-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>

Heh.  Daniel, if the %20 really bugs you, how do you feel about the +
sign?  I don't think it's part of the HTTP spec per-se but it has been
one of the W3C's recommendations:
http://www.w3.org/Addressing/URL/4_URI_Recommentations.html#z5
It may not look as nice to you as a clear space but every webserver
I've ever dealt with respects the recommendation.

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



[us...@httpd] AccessLog configuration: log requests depending upon HTTP STATUS code?

2009-10-06 Thread Kristian Rink
Folks;

being into trying to extract meaningful information off an apache 2.2
access.log / error.log, I wonder whether there is a straightforward way here
of setting up logging so that only requests resulting in an HTTP STATE ==
40x or 5xx will be logged. Looking at access.log I see that the information
(state = "200" in most cases which seems good :) ) is generally there, but
so far I failed figuring out how to exclude unwanted logging output (i.e.
any requests ending in a state 200 or 30x). Playing with log level settings
in apache2.conf doesn't seem to do the trick. Can any enlightened soul help
me through this? Will SetEnvIf do what I want here?

TIA and all the best,
Kristian


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



Re: [us...@httpd] how to avoid duplicating the document root in vhost conf files?

2009-10-06 Thread Krist van Besien
You might want to take a look at mod_macro. Especially if you have a
lot of VHOSTS, and have them all structured in the same way.

http://www.cri.ensmp.fr/~coelho/mod_macro/

Krist

-- 
krist.vanbes...@gmail.com
kr...@vanbesien.org
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: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org