Apache 如何在不破坏virtualhost的情况下更改将运行httpd的组

Apache 如何在不破坏virtualhost的情况下更改将运行httpd的组,apache,virtualhost,Apache,Virtualhost,如果我在httpd.conf中将组设置为www users,那么我的virtualhost站点将停止工作 让chmod将776中的所有内容添加到/var/www/html中,并发送给[我的用户]:www用户 第一个对localhost的请求有效,但第二个请求每次都失败(连接重置)。当将所有内容设置回apache:apache并重新启动httpd时,它就可以正常工作了 httpd.conf: NameVirtualHost localhost:80 <VirtualHost localhos

如果我在httpd.conf中将组设置为www users,那么我的virtualhost站点将停止工作

让chmod将776中的所有内容添加到/var/www/html中,并发送给[我的用户]:www用户

第一个对localhost的请求有效,但第二个请求每次都失败(连接重置)。当将所有内容设置回apache:apache并重新启动httpd时,它就可以正常工作了

httpd.conf:

NameVirtualHost localhost:80
<VirtualHost localhost:80>
    DocumentRoot /var/www/html/
    ServerName localhost
</VirtualHost>

NameVirtualHost marketingretreiver:80
<VirtualHost marketingretreiver:80>
    DocumentRoot /var/www/html/Symfony/web
    ServerName marketingretreiver
</VirtualHost>
NameVirtualHost本地主机:80
DocumentRoot/var/www/html/
服务器名本地主机
名称虚拟主机销售回执:80
DocumentRoot/var/www/html/Symfony/web
服务器名营销检索器

将SuExec与一个PHP模块(如SUPPP或类似模块)一起安装,然后您可以为每个virtualhost定义特定的组和用户,甚至可以使用770作为chmod。这个问题更适合@Prix谢谢你的回复,我会将用户和组设置回apache,就这样。有时可能会使用虚拟主机,然后一次只使用一个(本地主机也算一个)。您可以拥有任意多个虚拟主机,只要他们拥有正确的权限,它应该可以正常工作,而且每个系统都有自己的特性。