LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-13-2003, 09:43 AM   #1
colpaarm
LQ Newbie
 
Registered: Jun 2003
Posts: 22

Rep: Reputation: 15
Problems running mod_rewrite


Hi guys. I have rh 9.0 and am running apache 1.3.27. I want to force all connections to my webserver to be https and read that mod_rewrite works well in this instance. After messing with my httpd.conf file, I finally got my webserver to recognize my .httaccess file (before it was just ignoring it). However, rewrites don't work.

Specifically, I get an internal server error as soon as I even try and include the line

RewriteEngine on

with the message being

Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration

So I did some more research and realized that I have to load the module to use it (kinda makes sense, right?). So I included the following three lines

LoadModule rewrite_module modules/mod_rewrite.so
ClearModuleList
AddModule mod_rewrite.c

When I try to restart apache, I get

Syntax error on line 479 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/modules/mod_rewrite.so into server: /usr/local/apache/modules/mod_rewrite.so: cannot open shared object file: No such file or directory

So I did a locate for mod_rewrite.so and found it under /usr/lib/httpd/modules. So I changed the load statement to

LoadModule rewrite_module /usr/lib/httpd/modules/mod_rewrite.so

That gave me

Syntax error on line 479 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/lib/httpd/modules/mod_rewrite.so into server: /usr/lib/httpd/modules/mod_rewrite.so: undefined symbol: apr_pool_cleanup_null
./apachectl startssl: httpd could not be started

I also tried using the first loadmodule statement and placing a sym link which gave me the second error. Does anybody know what's up? I installed apache from tarball and I have DSO support. Thanks in advance.
 
Old 08-13-2003, 01:18 PM   #2
colpaarm
LQ Newbie
 
Registered: Jun 2003
Posts: 22

Original Poster
Rep: Reputation: 15
Maybe a different way to ask this question. What are the module dependencies for mod_rewrite?
 
Old 08-13-2003, 06:24 PM   #3
akaBeaVis
LQ Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
Rather than include this module in an .htaccess file, have you tried including it in httpd.conf (and if applicable httpd-perl.conf? These lines are located at line 41 and 91 in my httpd.conf file and 40 and 90 in my httpd-perl.conf file. My understanding is that the *order* of inclusion in those represents the dependencies.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache mod_rewrite problems Spudley Programming 2 12-01-2005 02:10 PM
Apache mod_rewrite problems compu73rg33k Linux - Software 0 11-27-2005 09:42 AM
Apache:mod_rewrite MadMikie Linux - Software 0 08-03-2004 07:33 AM
Mod_Rewrite help in Apace 1.3... vrillusions Linux - Software 0 08-11-2003 09:18 PM
Apache and mod_rewrite notsoevil Linux - General 0 01-23-2002 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration