How to change the apache user for a virtual host in Centos 7? -
i trying set web server on centos 7. have created virtual host editing /etc/httpd/conf/httpd.conf. root directory of virtual host set /var/www/html/domain.com. able open domain.com in browser no issue.
however, when use get_current_user() in php file test user server running under, output "root" security concernt.
how change user of virtual host? when set similar scenario in ubuntu, used apache2-mpm-itk module , configured virtual host "assignuserid your_username your_username" , did trick. don't know how in centos.
thanks
you can try use suexecusergroup that.
i found method plesk's configuration.
<virtualhost *:80> . . . <ifmodule mod_suexec.c> suexecusergroup "anyuser" "anygroup" </ifmodule> . . . /virtualhost>
Comments
Post a Comment