On Wed, Aug 13, 2014 at 6:40 AM, Goran Tepshic <purpleritza@gmail.com> wrote:

Just set up a FreeBSD jail to run httpd in it and all works good except these two, rewrite/proxy modules.

These are error logs excerpts:


mod_rewrite error:

[rewrite:crit] [pid 43447] (13)Permission denied: AH00666: mod_rewrite: could not init rewrite_mapr_lock_acquire in child

mod_proxy error:

[proxy:crit] [pid 43447] (13)Permission denied: AH02479: could not init proxy_mutex in child


Not sure permissions of what are being denied as html in document root is being served just fine when these modules are disabled.

I tried googling but found nothing but rubbish.


Please help, this thing is making me crazy.

httpd/APR on FreeBSD uses a file-based mutex ("flock") by default.  It looks like the mutex files are placed in a location where the httpd child processes don't have permission.

You should be able to use 2.4's Mutex directive (http://httpd.apache.org/docs/current/mod/core.html#mutex) to resolve the issue.

Perhaps the necessary magic is

Mutex file:/some/path/ default

where /some/path is writable by httpd parent and child.  I don't *think* this is some jail-specific issue, other than that child-writable paths in the jail may be different/more limited due to the way it is set up.


--
Born in Roswell... married an alien...
http://emptyhammock.com/