Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache as Proxy for several services |
|
Author |
|
ramon
Joined: 20 Mar 2018 Posts: 1
|
Posted: Wed 21 Mar '18 11:49 Post subject: Apache as Proxy for several services |
|
|
Dear all
I have quite a similar task like jameslio who asked at the beginning of the month.
In my case there is a server that acts as a firewall and a KVM hypervisor. It is physically connected to the internet and serves a private virtual subnet for the VM guests with NAT. It forwards all HTTP(S) requests to a VM which runs an Apache instance.
Several guest VMs are running on that server:
- Apache which only acts as proxy to forward VirtualDirectory to internal adress / port combinations.
- Some services who listen on their internal IP and a specific port.
Maybe an example can help: There is a request on "example.com/service1".
The request is NATed by iptables to the VM in which Apache is running.
Apache proxies the request to the VM in which service 1 is running on the port service 1 listens to (e.g. 192.168.1.101:8080).
I have everything running except for the Apache configuration which I struggle a bit. If I understand it correctly, I only have to set my sites-available/default.conf to:
Code: | <VirtualHost *:80>
ProxyPreserveHost On
<Location /service1>
ProxyPass http://192.168.1.101:8080/
ProxyPassReverse http://192.168.1.101:8080/
</Location>
</VirtualHost> |
Thanks for any help and advice. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Thu 18 Oct '18 10:31 Post subject: |
|
|
What is not working with that? Do you load all the needed modules? Anything related in the error and access log? |
|
Back to top |
|
|
|
|
|
|