You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by gb1071nx <gb...@globallyboundless.com> on 2007/09/07 18:03:15 UTC

[users@httpd] Unable to compile mod_rewrite

 
Hi, first-time poster (go easy on me)
 
I've downloaded httpd 2.0.59 and untar'd it. 

I've used ./configure like so: 

	root@foobar:/home/mikec/httpd-2.0.59# ./configure 
	--prefix=/usr/local/applications/2059 
	--enable-so 
	--enable-rewrite
	

(all on one line)

and my config.nice file contains:



	
	root@foobar:/home/mikec/httpd-2.0.59# cat config.nice 
	#! /bin/sh
	#
	# Created by configure
	 
	"./configure" \
	"--prefix=/usr/local/applications/2059" \
	"--enable-so" \
	"--enable-rewrite" \
	"$@"
	 
	

(so, that looks ok, right?)

then I do
make

then I do
make install

But: 

	root@foobar:/usr/local/applications/2059/modules# ll
	total 20
	drwxr-xr-x    2 root     root         4096 Sep  6 21:41 ./
	drwxr-xr-x   15 root     root         4096 Sep  6 21:41 ../
	-rw-r--r--    1 root     root         8504 Sep  6 21:36
httpd.exp
	root@thunderbird:/usr/local/applications/2059/modules# 

Here's this output, in case someone's curious: 

	root@foobar:/usr/local/applications/2059/bin# httpd -l
	Compiled-in modules:
	  http_core.c
	  mod_so.c
	suexec: disabled; invalid wrapper /usr/sbin/suexec


Where did I do wrong, or where do I start looking for why mod_rewrite
didn't compile? 

Um... I'm sure you'll want to know things like linux kernel and stuff
about gcc and well... I admit the last time I compiled apache was
watching over someone else's shoulder 3 years ago.  So... If you need
more info, please be specific about how I obtain it for you.  

And thanks.

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


RE: [users@httpd] Unable to compile mod_rewrite

Posted by gb1071nx <gb...@globallyboundless.com>.
 

> >
> > One last question then (the reason I'm even compiling apache in the 
> > first place):
> >
> > I have an existing production server that does not have mod_rewrite 
> > either as an .so or within the list of "httpd -l" .  Is it a very 
> > stupid idea to download the particular version of Apache 
> I'm currently 
> > running, compile mod_rewrite as a shared module, put it in 
> my existing 
> > modules directory, and start using it?  That is... I would 
> compile my 
> > apache to
> > /usr/local/notapache2  and I'd just move 
> > /usr/local/notapache2/modules/mod_rewrite.so to 
> > /usr/local/apache2/modules/mod_rewrite.so
> >
> >
> > I realize I should probably just take the opportunity to 
> upgrade, but 
> > I'm just wary of making changes.
> 
> This will only work if the architecture is exactly the same 
> and the two apache's have compatible binary interfaces (in 
> general, that means the first two parts of the version number 
> must be the same).
> 
> If all that is true, it will probably work. But you could 
> also just use apxs as described in the fourth example here:
> http://httpd.apache.org/docs/2.2/dso.html#usage
> 
> Joshua.


Thanks very much for your help Joshua,  this seems to have worked fine.
FTR, my version is 2.0.49, so I downloaded that version and did the
configure, make, make install with  mod-rewrite=shared. I then had a
mod_rewrite.so file that I just copied over to the existing server
deployment and  a restart seems to have loaded it fine.   Now, I just
have to get my regex right.  

This now seems easy!  I think I'll compile a bunch of servers, just for
fun, on the weekend!   :)

(no, not really)

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


Re: [users@httpd] Unable to compile mod_rewrite

Posted by Joshua Slive <jo...@slive.ca>.
On 9/7/07, gb1071nx <gb...@globallyboundless.com> wrote:
> Ah, that's the n00b in me coming through.  I didn't connect "DSO" with
> *.so
>
> One last question then (the reason I'm even compiling apache in the
> first place):
>
> I have an existing production server that does not have mod_rewrite
> either as an .so or within the list of "httpd -l" .  Is it a very stupid
> idea to download the particular version of Apache I'm currently running,
> compile mod_rewrite as a shared module, put it in my existing modules
> directory, and start using it?  That is... I would compile my apache to
> /usr/local/notapache2  and I'd just move
> /usr/local/notapache2/modules/mod_rewrite.so to
> /usr/local/apache2/modules/mod_rewrite.so
>
>
> I realize I should probably just take the opportunity to upgrade, but
> I'm just wary of making changes.

This will only work if the architecture is exactly the same and the
two apache's have compatible binary interfaces (in general, that means
the first two parts of the version number must be the same).

If all that is true, it will probably work. But you could also just
use apxs as described in the fourth example here:
http://httpd.apache.org/docs/2.2/dso.html#usage

Joshua.

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


RE: [users@httpd] Unable to compile mod_rewrite

Posted by gb1071nx <gb...@globallyboundless.com>.
Ah, that's the n00b in me coming through.  I didn't connect "DSO" with
*.so

One last question then (the reason I'm even compiling apache in the
first place):

I have an existing production server that does not have mod_rewrite
either as an .so or within the list of "httpd -l" .  Is it a very stupid
idea to download the particular version of Apache I'm currently running,
compile mod_rewrite as a shared module, put it in my existing modules
directory, and start using it?  That is... I would compile my apache to
/usr/local/notapache2  and I'd just move
/usr/local/notapache2/modules/mod_rewrite.so to
/usr/local/apache2/modules/mod_rewrite.so
 

I realize I should probably just take the opportunity to upgrade, but
I'm just wary of making changes. 

 

> -----Original Message-----
> From: jslive@gmail.com [mailto:jslive@gmail.com] On Behalf Of 
> Joshua Slive
> Sent: Friday, September 07, 2007 1:30 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Unable to compile mod_rewrite
> 
> On 9/7/07, gb1071nx <gb...@globallyboundless.com> wrote:
> 
> > Leaving aside arguments regarding desirability, how do I make it so 
> > that mod_rewrite becomes an .so file in the modules 
> directory?  Or is 
> > it even possible?
> 
> > > >         root@foobar:/home/mikec/httpd-2.0.59# ./configure
> > > >         --prefix=/usr/local/applications/2059
> > > >         --enable-so
> > > >         --enable-rewrite
> 
> See:
> http://httpd.apache.org/docs/2.2/install.html#configure
> which tells you to tack on =shared to the end of --enable-rewrite.
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> 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
> 
> 

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


Re: [users@httpd] Unable to compile mod_rewrite

Posted by Joshua Slive <jo...@slive.ca>.
On 9/7/07, gb1071nx <gb...@globallyboundless.com> wrote:

> Leaving aside arguments regarding desirability, how do I make it so that
> mod_rewrite becomes an .so file in the modules directory?  Or is it even
> possible?

> > >         root@foobar:/home/mikec/httpd-2.0.59# ./configure
> > >         --prefix=/usr/local/applications/2059
> > >         --enable-so
> > >         --enable-rewrite

See:
http://httpd.apache.org/docs/2.2/install.html#configure
which tells you to tack on =shared to the end of --enable-rewrite.

Joshua.

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


RE: [users@httpd] Unable to compile mod_rewrite

Posted by gb1071nx <gb...@globallyboundless.com>.
Ah. Right you were. 

root@foobar:/usr/local/applications/apache2059/bin# ./httpd -l
Compiled in modules:
  core.c
  mod_access.c
  mod_auth.c
  mod_include.c
  mod_log_config.c
  mod_env.c
  mod_setenvif.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_cgi.c
  mod_negotiation.c
  mod_dir.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_rewrite.c
  mod_so.c



Leaving aside arguments regarding desirability, how do I make it so that
mod_rewrite becomes an .so file in the modules directory?  Or is it even
possible? 




> -----Original Message-----
> From: jslive@gmail.com [mailto:jslive@gmail.com] On Behalf Of 
> Joshua Slive
> Sent: Friday, September 07, 2007 12:12 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Unable to compile mod_rewrite
> 
> On 9/7/07, gb1071nx <gb...@globallyboundless.com> wrote:
> >
> > Hi, first-time poster (go easy on me)
> >
> > I've downloaded httpd 2.0.59 and untar'd it.
> >
> > I've used ./configure like so:
> >
> >         root@foobar:/home/mikec/httpd-2.0.59# ./configure
> >         --prefix=/usr/local/applications/2059
> >         --enable-so
> >         --enable-rewrite
> 
> >         root@foobar:/usr/local/applications/2059/bin# httpd -l
> >         Compiled-in modules:
> >           http_core.c
> >           mod_so.c
> >         suexec: disabled; invalid wrapper /usr/sbin/suexec
> 
> The this last one with "./httpd -l"
> 
> I bet you are hitting another installed version of apache 
> httpd, rather than the freshly-compiled one.
> 
> Joshua.
> 
> ---------------------------------------------------------------------
> 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
> 
> 

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


Re: [users@httpd] Unable to compile mod_rewrite

Posted by Joshua Slive <jo...@slive.ca>.
On 9/7/07, gb1071nx <gb...@globallyboundless.com> wrote:
>
> Hi, first-time poster (go easy on me)
>
> I've downloaded httpd 2.0.59 and untar'd it.
>
> I've used ./configure like so:
>
>         root@foobar:/home/mikec/httpd-2.0.59# ./configure
>         --prefix=/usr/local/applications/2059
>         --enable-so
>         --enable-rewrite

>         root@foobar:/usr/local/applications/2059/bin# httpd -l
>         Compiled-in modules:
>           http_core.c
>           mod_so.c
>         suexec: disabled; invalid wrapper /usr/sbin/suexec

The this last one with "./httpd -l"

I bet you are hitting another installed version of apache httpd,
rather than the freshly-compiled one.

Joshua.

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