Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 93655 - apache-2.0.5* default VirtualHost directives in httpd.conf squash mod_rewrite engine
Summary: apache-2.0.5* default VirtualHost directives in httpd.conf squash mod_rewrite...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-23 02:27 UTC by Michael Crawford (ali3nx)
Modified: 2005-07-11 20:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Crawford (ali3nx) 2005-05-23 02:27:53 UTC
After the apache refresh installed on many of my hardened and/or dedicated
servers  all of my mod_rewrite virtual maps absolutely refused to work. I
consulted Beu on a few occasions, read the documentation and systematically tore
the refresh build's httpd.conf and all Includes files apart with full debugging
enabled to attempt to determine what could be the problem with mod_rewrite. I'm
certainly not an apache expert by any means and pcre gives me a headache but i
have 3 100MBit dedicated servers that absolutely must have mod_rewrite working. 

I tested included dynamic-vhosts.conf in vhosts.d with RewriteEngine on
 results were RewriteLog in logs/rewrite_log before while and after restarting
apache remained a 0 byte file while being tailed despite how many times you
refresh your browser. Scripting the mod_rewrite maps into httpd.conf produced no
 better results and mapped redirects consistantly do nothing but look cool and
leave you waiting for the big bang...

Reproducible: Always
Steps to Reproduce:
1. add a mod_rewrite Cond and ruleset to httpd.conf including RewriteLog and
RewriteLogLevel 9
2. enable mod rewrite with RewriteEngine on and restart apache
3. be utterly baffled when high debug mode logfile fills with nothing and your
rewrite ruleset does nothing but leave you scratching your egg

Actual Results:  
After many hours of testing various configuration issues i discovered that
commenting out the <VirtualHost> and NameVirtualHost :* directives in httpd.conf
allowed mod_rewrite to fuction. Aswell with rewrite maps scripted inside the
VirtualHost directives where DocumentRoot is defined rewrite engine does
function and the rewrite engine debug log also began working. This bug is not
specifically related to hardened. I've obtainted the same results on multiple
systems not utilizing hardened toolchain or grsec.

Expected Results:  
Mass virtual domains a la carte.. sans the bottle of tylenol for the average user.
Not even the apache documented examples on mod_rewrite work where "Gentoo
includes files for virtual aliases" could be highly frustrating for anyone.

p4k1tst0rm root # emerge info
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.4.3-20050110,
glibc-2.3.4.20041102-r1, 2.6.11-hardened-r1 i686)
=================================================================
System uname: 2.6.11-hardened-r1 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May  6 2005, 16:34:24)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O2 -fomit-frame-pointer -fforce-addr -mfpmath=sse -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control /var/run/dspam /var/spool/dspam"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -fomit-frame-pointer -fforce-addr -mfpmath=sse -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo
http://mirror.clarkson.edu/pub/distributions/gentoo/
http://gentoo.seren.com/gentoo ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X509 acl acpi adns alsa apache2 authdaemond bash-completion berkdb
bzip2 bzlib ccache chroot cluster crypt ctype curl curlwrappers dba dio emboss
encode erandom exif extensions fam fortran freetds ftp gd gdbm gmp hardened
hardenedphp imagemagick imap imlib innodb ipv6 java javamail junit kerberos ldap
libg++ libwww maildir memlimit mhash mmx mp3 mpi mysql nagios-dns nagios-ntp
nagios-ping nagios-ssh ncurses neural nis nls nptl objc odbc pam pcntl pcre perl
pg-hier pg-intdatetime pg-vacuumdelay php pic pie png posix postgres procmail
python readline ruby sasl sendfile session sftplogging shaper shared sharedext
sharedmem simplexml snmp sockets softquota spell sse ssl sysvipc szip tcpd tiff
unicode vda vhosts virtual-users virus-scan wddx xml xml2 xmlrpc xsl zlib
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-07-11 20:11:03 UTC
mod_rewrite works just fine for me using new-style configuration.
please attach your configurations and repoen so we can determine why it isn't
working for you.