首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >mod_rewrite: Could not set permissions on rewrite_log_lock

mod_rewrite: Could not set permissions on rewrite_log_lock

原创
作者头像
shirishiyue
发布2018-11-29 11:52:12
1.7K0
发布2018-11-29 11:52:12
举报
文章被收录于专栏:全栈码全栈码全栈码

编译后,启动apache,error_log里报错:

[crit] (22)Invalid argument: mod_rewrite: Could not set permissions on rewrite_log_lock; check User and Group directives

Configuration Failed

google 和 baidu 竟然一直没找到直接的解决。。。。。

最终解决办法:

<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
#  . On HPUX you may not be able to use shared memory as nobody, and the
#    suggested workaround is to create a user www and use that user.
#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
#  when the value of (unsigned)Group is above 60000; 
#  don't use Group #-1 on these systems!
#
User nobody
Group #-1
</IfModule>
</IfModule>

默认的http.conf 上面的 Group 有问题!!!

修改为 nobody 即可。

启动apache是,会自动创建user和group账户。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档