Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

where is mod_rewrite? 2

Status
Not open for further replies.

franklin97355

Technical User
Jul 11, 2002
3,753
US
I've just installed Apache 2.0.46 and can't find mod_rewrite. Where should I look and how should I set apache up to use it?
Thanks
 
OK, I've reinstalled apache 2.0.46 from the tar file then configured, make, make install. after this there is only one mod_rewrite on my system in /usr/lib/httpd/modules and when I set httpd.conf to use this file it complains. What am I doing wrong? This is driving me crazy (and I don't have any more hair to pull out)

Thanks for any help you can give me
 
Sorry you're having difficulty. I've only installed with Apache 1.3.27. Version 2.0 is still in Beta for a lot of stuff. I used the following command when compiling Apache with static modules.
First configure:
./configure --enable-module=ssl ...
--activate-module=/path/to/src/modules/bar.a --enable-module=foo --enable-module=rewrite
make

As you can see, only line for rewrite is
--enable-module=rewrite

I'm not sure why was so simple, but it was.

Additional note:
When using 32 bit compiler, modify all Makefiles to use 32 bit library modules. Ex. If part of cmopile with oci8 and oracle 9.0.1, use 9.0.1/lib32 not 9.0.1/lib
 
what is the exact error message that you recieve when you try to start apache?
 
Windir:
The error message is as follows

Syntax error on line 232 of /usr/local/apache2/conf/httpd.conf:
Can't locate API module structure `mod_rewrite' in file /usr/lib/httpd/modules/mod_rewrite.so: /usr/local/apache2/lib/libapr-0.so.0: undefined symbol: mod_rewrite
 
Your [tt]LoadModule[/tt] directive is incorrect. Try this one instead:
[tt]LoadModule rewrite_module /usr/lib/httpd/modules/mod_rewrite.so[/tt]

//Daniel
 
danielhozac: Thanks, I tried it your way but then it said it was not for this version of apache. I then removed all copies of mod_rewrite on the computer and rebuilt apache. Now there isn't a mod_rewrite.so anywhere. Anybody have any more ideas?
 
Did you build mod_rewrite as a compiled in module or as a DSO?

//Daniel
 
Over in the Linux forum they said I should use:

./configure --prefix=/usr/local/apache2 --enable-module=so --enable-module-rewrite; make; make install

so that is how I did it. (I think that would be DSO?)
 
I also had the same difficulty, because I compiled Apache with --enable-so --enable-module=rewrite and mod_rewrite.so kept missing from "modules" dir.
Only after ./configure --enable-so --enable-mods-shared=rewrite the so was generated.
Good luck

Pedro Fonseca
pedro_fonseca@netcabo.pt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top