更改APACHE_RUN_USER后,apache失败:用户名错误

时间:2018-08-23 14:44:47

标签: apache

我想将开发计算机上的apache用户设置为当前用户,以简化操作,而不必更改文件权限。 所以我编辑/etc/apache2/envvars并更改:

export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data

收件人:

export APACHE_RUN_USER=ben
export APACHE_RUN_GROUP=ben

当我使用sudo service apache2 restart重新启动apache时,我得到:

-- Unit apache2.service has begun starting up.
Aug 23 16:31:38 P-CTI0229807 apache2[2602]:  * Starting Apache httpd web server apache2
Aug 23 16:31:38 P-CTI0229807 apache2[2602]:  *
Aug 23 16:31:38 P-CTI0229807 apache2[2602]:  * The apache2 configtest failed.
Aug 23 16:31:38 P-CTI0229807 apache2[2602]: Output of config test was:
Aug 23 16:31:38 P-CTI0229807 apache2[2602]: AH00543: apache2: bad user name ben
Aug 23 16:31:38 P-CTI0229807 apache2[2602]: Action 'configtest' failed.
Aug 23 16:31:38 P-CTI0229807 apache2[2602]: The Apache error log may have more information.
Aug 23 16:31:38 P-CTI0229807 systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 23 16:31:38 P-CTI0229807 systemd[1]: Failed to start LSB: Apache2 web server.

要让我的当前用户运行apache2,我缺少什么?

0 个答案:

没有答案