Score:0

Set up a reverse proxy for local domains

cn flag

My web server (apache2) is accessible on my LAN with its host name, let's say, jarvis (url: http://jarvis/).

I have a Gitea instance running in my local network which is accessible via http://jarvis:3000. It obviously runs on the same machine as the webserver does and runs inside a Docker container (just as the webserver does) with container name, let's say, gitea. They share the same docker network so the web server can access the gitea instance through http://gitea:3000.

In my Pi-hole, I've set up a local DNS entry http://git.home/ which routes to the IP address of my web server jarvis on 192.168.154.x. Now, what I want is to configure apache2 to route access via this domain to http://gitea:3000.

So, I decided to alter my 000-default.conf as follows:

<VirtualHost *:80>
  #...
</VirtualHost>

<VirtualHost git.home:80>
  ServerName git.home

  ProxyPass / http://gitea:3000/
  ProxyPassReverse / http://gitea:3000/
</VirtualHost>

Now, when browsing to http://git.home/ I keep getting to the web server root page instead of the Gitea instance.

What did I do wrong with the reverse proxy configuration? Is there anything I should keep in mind when creating reverse proxies for local domains?

I sit in a Tesla and translated this thread with Ai:

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.