Question

I want to know if it's possible (and how) to redirect an URL to a specific port of vhost without changing the URL.

Example:

http://foo.example.com:80/bar
|
| "include"
|
http://foo.example.com:8765

# foo is a vhost.
# 80 is an Apache port.
# 8765 is a GNU/GPL server port.

I want to display informations of GNU/GPL server using apache by URL http://foo.example.com:80/bar without redirecting. The purpose is to implement the application running under GNU/GPL to my Apache application without change port and keep a clean URL.

Archlinux 3.10.23
Apache/2.4.9 (Unix)
PHP 5.5.10
Was it helpful?

Solution

Assuming you have a working virtualhost responding at http://foo.example.com:80 you can enable mod_proxy and use "ProxyPass" directive:

ProxyPass /bar http://foo.example.com:8765

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top