简体   繁体   English

Apache-配置通过相同IP但不同端口访问的多个网站

[英]Apache - Configuring multiple websites accessed by same IP but different ports

I have done this in IIS7.5 with ease. 我已经在IIS7.5中轻松完成了此操作。

Say I have a domain mbdev.myftp.biz. 说我有一个域mbdev.myftp.biz。

On IIS I have setup sites but each one has a different port. 在IIS上,我有安装站点,但是每个站点都有一个不同的端口。

Example: 例:

mbdev.myftp.biz:8004
mbdev.myftp.biz:8006

The only thing that is different is the port for the site. 唯一不同的是站点的端口。 Those above URL's got to actual sites on the IIS box. URL上方的那些内容已到达IIS框中的实际站点。

How can I accomplish the same thing with APACHE? 如何使用APACHE完成同一件事? Having the site be on a specific port? 该站点位于特定端口上吗?

For Example: 例如:

mbdev.myftp.biz:8600
mbdev.myftp.biz:8601

Apache accomplishes this through the VirtualHost directive. Apache通过VirtualHost指令完成此任务。 Documentation for version 2.4 can be found on http://httpd.apache.org/docs/2.4/vhosts/index.html and more specifically the configuration directive http://httpd.apache.org/docs/2.4/mod/core.html#virtualhost 可以在http://httpd.apache.org/docs/2.4/vhosts/index.html上找到有关2.4版的文档,更具体地说,可以在配置指令http://httpd.apache.org/docs/2.4/mod/core上找到.html#virtualhost

An example virtualhost config directive pulled from the link above: 从上面的链接中提取了一个示例virtualhost config指令:

<VirtualHost 10.1.2.3:80>
  ServerAdmin webmaster@host.example.com
  DocumentRoot /www/docs/host.example.com
  ServerName host.example.com
  ErrorLog logs/host.example.com-error_log
  TransferLog logs/host.example.com-access_log
</VirtualHost>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我如何使用不同的端口在同一IP上运行多个Web应用程序 - how can i run multiple web applications on same ip using different ports Apache多个端口绑定 - Apache multiple ports binded 如何设置VirtualHosts将同一IP上的两个端口指向不同的ServerNames? - How do I setup VirtualHosts to point two ports on same IP to different ServerNames? 将不同的网站分配给apache上的不同网络 - Assign different websites to different networks on apache Apache 在同一 IP 上配置多个站点,以便远程访问 - Apache Configure Multiple Site on same IP, to be access remotely 我们如何在AWS EC2 Linux实例的不同端口上安装多个apache服务器 - How can we install multiple apache servers at different ports in aws ec2 linux instance HTTP2:不同的域但相同的IP,多连接还是一个连接? - HTTP2: different domain but same IP, multiple connection or one connection? Linux Ubuntu 14.04在1台机器上的2个不同Web服务器上运行2个网站1 ip - Linux Ubuntu 14.04 running 2 websites on 2 different web servers on 1 machine 1 ip 使用同一个脚本运行多个网站 - Having multiple websites running from the same script 要加入具有1个套接字但不同端口的多个组播组? - Joining Multiple Multicast Groups With 1 Socket but Different Ports?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM