Apache上的虚拟主机可以访问另一个虚拟主机的文件吗? [英] Can a Virtual Host on Apache access the files of another Virtual Host?

查看:123
本文介绍了Apache上的虚拟主机可以访问另一个虚拟主机的文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为几个朋友为不同的域设置一些虚拟主机,并想知道一个虚拟主机是否可以通过PHP或任何其他选项访问另一台主机的文件,或者是否完全是隔离,因此它们可以运行的任何脚本只会影响其区域.

I'm looking to set up a few virtual hosts for different domains for a few friends, and want to know if one virtual host can access files from another host, whether it be via PHP or any other option or if it's totally isolated, so any scripts they can run would only affect their area.

推荐答案

Apache虚拟主机"只是主机名(或ip地址或端口)到特定配置指令集的映射.这并不意味着遏制"或孤立.一切仍在同一主机上运行.

An Apache "virtual host" is just a mapping of a hostname (or ip address or port) to a particular set of configuration directives. There is no "containment" or isolation implied by this; everything is still running on the same host.

如果您想真正隔离应用程序,请考虑研究诸如Docker(或虚拟机解决方案)之类的容器技术,并使用前端代理将流量按需定向到适当的后端.

If you want to actually isolate applications, consider investigating container technology like Docker (or a virtual machine solution), with a front-end proxy directing traffic as necessary to the appropriate backend.

这篇关于Apache上的虚拟主机可以访问另一个虚拟主机的文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆