apache2 recompile with mod_rewrite -- without losing any of the current config!
Here is the deal.
On a sles9 server I have apache 2 compiled but am
not using the stuff from yast ... compiled our own. But, it's scary,
cuz we don't really know what we are doing, and this is going to be a real, genuine, the public face of the business web server! Yikes!
Anyway ... the developers have asked that we enable/re-compile apache to include mod_rewrite functionality. So I need to figure out how to add that in, without modifying anything else about how apache is configured.
I thought maybe I would not have to re-compile, since doesn't apache2 use modules, so that you don't have to recomplile anytimg you add something? Anyway, I found in the httpd.conf file that the load line was present, but appeared to be incomplete:
So I googled, and found that others who use mod_rewrite, the load
modules line looks like this:
LoadModule rewrite_module modules/mod_rewrite.so
So I added that, and tried to restart apache. I get this report, when trying to stop it:
rpcweb:/home/httpd/bin # ./apachectl stop
[Thu Jul 27 22:31:40 2006] [warn] module php5_module is already loaded, skipping
Syntax error on line 234 of /home/httpd/conf/httpd.conf:
Cannot load /home/httpd/modules/mod_rewrite.so into server:
/home/httpd/modules/mod_rewrite.so: cannot open shared object file: No such file or directory
this tells me that mod_rewrite may not actually be present, so doing a find, I confirm this. mod_rewrite.so is nowhere to be found. However, looking at the source files, we do have:
rpcweb:~/Documents/httpd-2.0.55/modules # ls mappers
So, I guess we need to re-compile this baby, so that the above files
get turned into an .so file, correct?
Anyway, it was a long time ago that I originally compiled it, and (of course) I cannot find my notes regarding the compile options I used. It looks as though apachectl -V gives some good info, though:
rpcweb:/home/httpd/bin # ./apachectl -V
Server version: Apache/2.0.55
Server built: Feb 9 2006 13:38:43
Server's Module Magic Number: 20020903:11
Server compiled with....
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
so, given the above, and knowing that we want everything to be exactly as it is now, with the addition of mod_rewrite:
what do I have to do to accomplish this? How do figure out what
compile options to specify in order to ADD mod_rewrite, but not modify anything else?
lol! If anyone has a quick suggestion, so that I don't have to spend
my weekend labbing various compile scenarios, it would be MUCH
We use the rpm package on our server but if your config files are set up like mine you would:
|All times are GMT -5. The time now is 06:02 PM.|