I am probably forgetting something basic, but can someone show me what I am doing wrong when I try to enable the mod_rewrite module for Apache 2.
This is what I am doing:
(Fedora 10 platform)
The mod_rewrite module seems to already be present in the /lib directory
Code:
[root@localhost modules]# pwd
/usr/lib/httpd/modules
[root@localhost modules]# ls -l mod_rewrite.so
-rwxr-xr-x 1 root root 59256 2008-10-21 06:53 mod_rewrite.so
[root@localhost modules]#
I configure apache with the 'enable' extension '--enable-rewrite' and then did a 'make' and 'make-install' without any errors.
When I go into the httpd.conf file, I do not see the "LoadModule' line for mod_rewrite. So, I manually put it in. Here is a snippet of httpd.conf:
Code:
LoadModule foo_module modules/mod_foo.so
LoadModule php5_module modules/libphp5.so
LoadModule mod_rewrite modules/mod_rewrite.so
#
However, I look over in the apache modules directory, and I don't see it:
Code:
[root@localhost modules]# pwd
/usr/local/apache2/modules
[root@localhost modules]# ls -l
total 12428
-rw-r--r-- 1 root root 9046 2009-02-01 15:13 httpd.exp
-rwxr-xr-x 1 root root 12691378 2009-01-01 22:57 libphp5.so
[root@localhost modules]#
So, I manually copy it over from /usr/lib/httpd/modules:
Code:
[root@localhost modules]# pwd
/usr/local/apache2/modules
[root@localhost modules]# ls -l
total 12492
-rw-r--r-- 1 root root 9046 2009-02-01 15:13 httpd.exp
-rwxr-xr-x 1 root root 12691378 2009-01-01 22:57 libphp5.so
-rwxr-xr-x 1 root root 59256 2009-02-01 15:59 mod_rewrite.so
[root@localhost modules]#
I then restart apache, and I get the following error:
Code:
[root@localhost conf]# /usr/local/apache2/bin/apachectl restart
httpd: Syntax error on line 54 of /usr/local/apache2/conf/httpd.conf: Can't locate API module structure `mod_rewrite' in file /usr/local/apache2/modules/mod_rewrite.so: /usr/local/apache2/modules/mod_rewrite.so: undefined symbol: mod_rewrite
Can someone show me my error or point me to documentation that might explain how to do this?