I have an Apache Webserver running, which is reachable over the ip/port-combination
123.456.789:9000 from my browser.
Also I have a GitLab instance running on the ip/port-combination
123.456.789:8888 and a GitLab module named KanBan on
If someone requests the website
123.456.789:9000/gitlab I want the Apache Webserver to route the request to
Respectively If someone requests
123.456.789:9000/kanban I want the Apache Webserver route to
So instead of opening the ports 8888 and 8889 directly I want the Apache Webserver to function as a tunnel, which binds the two adresses to different ports internally while the ip remains the same.
I read that this kind of configuration is done inside httpd.conf and involses adding so called virtual hosts therein. Also it could involve some Linux specific routing via
Is this correct and if so can someone point me in the right direction of how to adpat the httpd.conf file?
If this is not possible how could I nevertheless configure it on my CentOs 7.1 Server?
Before cross-posting this on https://serverfault.com/ could an Administrator/Mod do it?
I have found this https://stackoverflow.com/questions/8541182/apache-redirect-to-another-port and it looks like its the same use case, but i am still trying it out.
After checking in with people in the IRC Channel #httpd, I was told that Apache Reverse Proxies should do the trick and was given this resource, http://www.apachetutor.org/admin/reverseproxies, which i am currently working on.
Assuming you have a simple httpd configuration, a neat way to implement what you are looking for would be:
Create a file named
/etc/httpd/conf.d/gitlab.confwith the contents:
ProxyPass "/gitlab" "http://123.456.789:8888" ProxyPassReverse "/gitlab" "http://123.456.789:8888"
Create another file named
/etc/httpd/conf.d/kanban.confwith the contents:
ProxyPass "/kanban" "http://123.456.789:8889" ProxyPassReverse "/kanban" "http://123.456.789:8889"
I hope this helps.