包括本地“外部”使用 php 的 php/html 文件
我会尝试尽可能明智地表达这一点。
我有两台与本地 IP (10.1.2.1 / 10.1.2.2) 连接在一起的专用服务器。基本上我需要能够从任一服务器互换地包含文件(php 脚本/html/等),但不存在允许运行外部脚本的风险。
这可能吗?
在两台具有完全 root 访问权限的服务器上运行 CentOS 5。
I'll try and word this as sensibly as possible.
I have two dedicated servers that are networked together with local IP's (10.1.2.1 / 10.1.2.2). Basically I need to be able to include files (php scripts/html/etc.) interchangeably from either server, but without the risk of allowing external scripts to be run.
Is this possible?
Running CentOS 5 on both servers with full root access.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为什么不相互挂载其他服务器的驱动器并相应地设置 PHP 的
include_path
ini 设置。这样您就可以安全地包含远程文件,而不必担心常见的攻击媒介。Why not mutually mount the other server's drive and set PHP's
include_path
ini-setting accordingly. This way you can safely include remote files without worrying about the usual attack vectors.如果两台计算机都已联网,您始终可以在主 Web 服务器上创建一个虚拟目录,该目录指向包含辅助 PHP 文件的网络驱动器。
If both machines are networked, you could always create a virtual directory on the main web server that points to the network drive with the secondary PHP files.