Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Port Redirection

8:02 pm on Feb 24, 2014 (gmt 0)

New User

joined:Feb 24, 2014
posts: 2
votes: 0

Hi, I have an apache server running on mysite.com:80 and and another program running on mysite.com:12345

I would like my apache configuration to access this program via let say
mysite.com:80/myprogram (under the hood it would go to this adress: mysite.com:12345)
because some places the 12345 port is blocked.

Is there a way to configure my apache to do something like that?: I think it would be via virtual host?

btw i'm using fedora.

many thanks!
10:51 pm on Feb 24, 2014 (gmt 0)


WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
votes: 10

welcome to WebmasterWorld, olygraph!

with apache you would do this using mod_proxy:
http://httpd.apache.org/docs/current/mod/mod_proxy.html [httpd.apache.org]
typically you would implement this using the ProxyPass and ProxyPassReverse directives.

you can also do this using mod_rewrite directive RewriteRule's [P] flag:
2:32 pm on Feb 25, 2014 (gmt 0)

New User

joined:Feb 24, 2014
posts: 2
votes: 0

That was exactly what I was looking for! Thanks working #1!