[英]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.