如何端口转发 MediaTemple 服务器以将端口重定向到目录?
我刚刚成为 MediaTemple 虚拟专用服务器的自豪拥有者。 我的问题是:如何转发端口以将其重定向到目录? 例如,我想将端口 6783
(例如 http://www.imagreedybastard.com:6783
)重定向到目录 /usr/directories/管理员/
I've just become a proud owner of a MediaTemple virtual-dedicated server. My question is: How can I forward a port to redirect it to a directory? For example, I would like to redirect port 6783
(e.g., http://www.imagreedybastard.com:6783
) to the directory /usr/directories/admin/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这取决于您的网络服务器。 对于 Apache,您可以定义一个新的侦听端口,在该端口上创建一个虚拟主机,并根据需要指向其文档根:
This depends on your web server. For Apache, you can define a new listening port, create a virtual host on that port, and point its document root as desired:
您需要在 VPS 上运行 Web 服务器,例如 Apache 或 Nginx。 将服务器设置为侦听正确的端口后,您可能还需要配置虚拟机的防火墙以允许对该端口的请求。
关于将其指向正确的目录,您需要设置一个 Apache
VirtualHost
或 Nginx服务器
块。You'll need to run a web server on the VPS such as Apache or Nginx. After you set up the server to listen on the proper port, you'll probably also need to configure your virtual machine's firewall to allow requests to that port.
With regards to pointing it to the proper directory, you'll want to set up an Apache
VirtualHost
or Nginxserver
block.