PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, September 21, 2022

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

 September 21, 2022     apache, reverse-proxy, virtualhost     No comments   

Issue

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 ?


Solution

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.



Answered By - Avi
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing