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

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -