简体   繁体   中英

How to run Apache2.4 on two different Ports and set up proxypass and reversepass at the same time (Windows 2012)?

My question is actually double.

1) I would like to have apache to run on two different port. Port 80 and port 8000.

2 ) Both are actually front end reverse proxy to TOMCAT.

So far i know how to set up my reverseproxy directive with ajp for tomcat and everything works fine.

What i am confused about is

a) how to you set the directive of reverse proxy to include the port too.

b) I red here and there that it is not enough to have the two directive to listen on two ports Listen 80 Listen 800 but one has to use virtual host to.

Please can someone guide me on what needs to be done for it work straight ?

As you alluded to, you'll want to use multiple vhosts. The apache config will look something like:

Listen 80
<VirtualHost *:80>
 ...
</VirtualHost>

Listen 8000
<VirtualHost *:8000>
 ...
</VirtualHost>

You can then include some of your config in both virtual hosts to centralize it in one place. For more, see the documentation .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM