我想将开发计算机上的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,我缺少什么?