Score:0

Apache2 reverse proxy

gt flag

I set up a domain with port 443 open where all the traffic is coming in through.

I want to set up Apache2 as a reverse proxy so that when traffic comes into my domain depending on the subdomain, Apache will route it to the correct server within the network.

An Example Domain entered -> Internal server Address

https://cloud.example.com -> 192.169.29.250 // Server where Nextcloud is running

https://git.example.com -> 192.169.29.200 // Server where GitLab is running

https://example.com -> 192.169.29.100 // Server where homepage (NodeJS) is running

<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com *.example.com

    ProxyPass / http://127.0.0.1:8080/
    ProxyPassReverse / http://127.0.0.1:8080/

    ProxyPass /cloud http://192.168.29.250
    ProxyPassReverse /cloud http://192.168.29.250

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
</VirtualHost>

So if I search for https://cloud.example.com I should reach the Nextcloud server within my network. Currently, what's happening is that I always land on the homepage. Help on how to properly route based on a subdomain will be appreshiated.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.