# Apache2 won't start. log points to mod_rewrite problem

## intendedacceleration

I'm trying to get apache running and I can't seem to figure out what the problem is. I just did the very basic editing to the apache conf files, nothing fancy here. Here is the error I am getting in the apache error log.

```
Function not implimented: mod_rewrite: could not create rewrite_log_lock

Configuration Failed
```

Any idea's?

----------

## intendedacceleration

If anybody can help in any way I would appreciate it greatly. This is going to be our new company webserver and I need to get it up asap.

----------

## intendedacceleration

I commented out the loading of the mod_rewrite.so module in the apache2.conf file and now it will start. Is this just a bug in the latest version of apache or do I have something wrong?

----------

## intendedacceleration

 *intendedacceleration wrote:*   

> I commented out the loading of the mod_rewrite.so module in the apache2.conf file and now it will start. Is this just a bug in the latest version of apache or do I have something wrong?

 

Ok I was wrong, when I commented it out it appeared to have started giving me the [ok] status from the startup script, but in fact it had not started. When I went to stop the supposedly running server it failed saying there was no such process running. So I deleted all of my apache2 conf files, unmerged apache and emerged it again, this time leaving the conf files untouched. Result? Still the same problem. Is anybody else having this problem? Please help!

----------

## intendedacceleration

bump! Still need some help with this.

----------

## fleed

What version of apache are you using? If you're using unstable versions it might be a good idea to unmerge that and try a stable one.

----------

## meyerm

I just installes an apache2 on a absolut clean machine (setup this night). It starts the apache2-process as user root but somtimes don't spawn the childprocesses... (and sometimes it does - but mostly after a quite long period of time).

Perhaps this has to do someting with not beeing able to bind the port or so? Or DNS? Ich will earch further... Hmm, perhaps I should restart the computer using a 2.4 kernel?? Stay tuned...  :Wink: 

----------

## meyerm

I can't believe it... I now know what happened. The last log-message was a problem with auth-digest. So diabling the auth-module worked...

 *Solution 1 wrote:*   

> comment out 
> 
> ```
> LoadModule auth_digest_module            modules/mod_auth_digest.so
> ```
> ...

 

But what is the reason? Well, apache tries to get random data out of /dev/random! But this device is only filled when there is some activity on the server (keyboard, disc etc).

 *Solution 2 wrote:*   

> create activity. f.ex.
> 
> ```
> updatedb
> ```
> ...

 

 *Solution 3 wrote:*   

> compile apache using another random-source ("less secure")
> 
> ```
> MY_BUILTINS="--with-devrandom=/dev/urandom" emerge apache
> ```
> ...

 

I don't know what to do else... :-/ But I think, I will recompile apache since I'm also using SSL and I don't know if this will make problems with a missing random-device. OK, when the server goes to production, /dev/random will be filled enough - but that's a little bit too risky  :Wink: 

HTH

	Marcel

----------

## meyerm

Oh, BTW:

https://bugs.gentoo.org/show_bug.cgi?id=37039

 :Very Happy: 

----------

## fleed

I see you're having lots of fun with apache!   :Laughing: 

Good thing I haven't upgraded my system in a while then...

----------

## intendedacceleration

I fixed it, but I don't really know how. I was using the gs-sources kernel, but decided that I wanted to try the 2.6.1 kernel so I downloaded that from kernel.org (didn't use an ebuild) and now apache starts fine. Must be something with the latest apache version and the gs-sources kernel.

----------

## Ateo

I get this error when I boot into kernel 2.6.0.. Apache boots just fine with kernel 2.4.22. So I'm baffled.... using apache 2

----------

## wll

Here's another data point -- I built the gs-sources day before yesterday.

Apache2 starts just fine.

----------

## langthang

Same error here. But it was my fault. I emerged apache against glibc with NPTL support then I reemerge glibc without NPTL then apache2 won't start with error: "Function not implemented: mod_rewrite: could not create rewrite_log_lock" . Reemerge Apache solve it.

----------

## cottonmouth

Check out jethromann's solution

 *jethromann wrote:*   

> I had the same error cause I cut too much out of the kernel.
> 
> Try adding System V IPC support to your kernel.
> 
> ```
> ...

 

----------

