You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Christopher E. Welton" <cw...@maxmediamarketing.com> on 2004/03/02 04:34:01 UTC

[users@httpd] Bizarre behavior, segfaulting on mod_rewrite + httpd 1.3.29 + mod_proxy

Question:

My server is exhibiting bizarre bad behavior when mod_rewrite is
enabled. When processing a url such as "/" or "/index.pl" it begins
processing the url according to the rewriterule directives and then
segfaults. This occurs with about 10 children per request, probably due
to subrequests on the page. At other times, it will process the url but
may skip one or more rewrite rules in the process. Help! I would really
appreciate any insight or suggestions you might have.

Details:

I am running two instances of apache 1.3.29 on 
Linux version 2.4.24 (root@idx85.idx.net) (gcc version 2.96 20000731
(Red Hat Linux 7.3 2.96-113))

I am running one httpd as a "light" server to process static pages,
rewrite urls, and proxy for the backend "heavy" server. The heavy server
is running mod_perl 1.29. My light server is the one having problems.

My light server was compiled from source on the system and has these
modules compiled in:

Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_include.c
  mod_dir.c
  mod_alias.c
  mod_rewrite.c
  mod_access.c
  mod_auth.c
  mod_proxy.c
  mod_setenvif.c
  mod_ssl.c
  mod_proxy_add_forward.c
  suexec: disabled; invalid wrapper /usr/local/httpd_lite/bin/suexec

Light and heavy servers are installed in separate trees
(/usr/local/httpd_lite and /usr/local/apache)

The relevant portion of my configuration file looks like this:

[...snip]
RewriteEngine On
RewriteOptions inherit
RewriteLog /usr/local/httpd_lite/logs/rewrites
RewriteLogLevel 9
RewriteRule \.ico /usr/local/apache/htdocs/lead_site/favicon.ico [L]

<VirtualHost *:80>
DocumentRoot "/usr/local/apache/htdocs/lead_site/absolutelyfamous.com"
ServerName absolutelyfamous.com
ServerAlias absolutelyfamous.com *.absolutelyfamous.com
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.absolutelyfamous.com$ [NC]
RewriteRule ^/(.*)$ http://www.absolutelyfamous.com/$1 [L,R]
# handle statics and traditional CGI's directly
RewriteRule \.(swf|jpg|jpeg|htm|html|png|gif|css|js|txt)$ - [L,NC]
# pass .pl's to the heavy-weight server via proxy
RewriteRule ^/$ /index.pl
RewriteRule /(.*) http://localhost:8081/absolutelyfamous.com/$1 [PT]
ProxyPassReverse / http://www.absolutelyfamous.com/
</VirtualHost>
[...snip]

The rewrite log indicates that processing began on the URL prior to the
segfault. Here is an excerpt:

[ip omitted] - - [01/Mar/2004:17:20:49 -0800]
[absolutelyfamous.com/sid#812c7dc][rid#813c5e4/initial] (2) init rewrite
engine with requested uri /var/html/blue_pill.htm
[ip omitted] - - [01/Mar/2004:17:20:49 -0800]
[absolutelyfamous.com/sid#812c7dc][rid#813c5e4/initial] (3) applying
pattern '^/(.*)$' to uri '/var/html/blue_pill.htm

These two rewrite log messages repeat about 10 times, once for each
segfault'ed child.

-- 
Best,

Chris Welton
M a x  M e d i a
New Media. New Revenues. Max Results.

Max Media
P.O. Box 5812
Santa Monica, CA 90409-5812

phone:    562-946-3370
cellular: 562-659-3072
fax:      703-940-8261
http://www.maxmediamarketing.com 
ting.com 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org