# \[Solved\] HowTo setup a subdomain and reverse proxy in FBox?

**URL:** https://discuss.freedombox.org/t/solved-howto-setup-a-subdomain-and-reverse-proxy-in-fbox/773
**Category:** Support
**Created:** [March 31, 2020, 10:59am UTC](https://discuss.freedombox.org/t/solved-howto-setup-a-subdomain-and-reverse-proxy-in-fbox/773 "2020-03-31T10:59:35Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![homer77](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/homer77/32/283_2.png) [@homer77](https://discuss.freedombox.org/u/homer77)
#### Post date: [March 31, 2020, 10:59am UTC](https://discuss.freedombox.org/t/solved-howto-setup-a-subdomain-and-reverse-proxy-in-fbox/773/1 "2020-03-31T10:59:35Z")

</div>

I set up an [gitea](https://gitea.io) instance on my FB which I had installed before on another Homeserver.

I can call it under `http://\<local-ip\>:3000` but of course I would like to call it under `https://\<mydomain\>` or better under the subdomain `https://git.\<mydomain>` I formerly used.

On my old homeserver I used nginx and a reverse-proxy, expanded my letsencrypt-certs and that went well.  
But now I’m completely unaware how to hook the localhost:3000 to [https://git](https://git).\<mydomain\> under apache resp. plinth.

If s.o. could give me an example .conf for that task that would be highly appreciated 😅

> ! Btw. I like to recommend gitea as a replacement for gitweb in FB as it is quite lightweight and gives you everything you might be used to from github or gitlab including issue-management. Maybe you want to take a look at it.

---

<div class="post-metadata">

### Author: ![Sunil](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/sunil/32/8_2.png) [@Sunil](https://discuss.freedombox.org/u/Sunil)
#### Post date: [March 31, 2020, 4:14pm UTC](https://discuss.freedombox.org/t/solved-howto-setup-a-subdomain-and-reverse-proxy-in-fbox/773/2 "2020-03-31T16:14:53Z")

</div>

Easiest is to have a path under main domain instead of subdomain. Try adding the following `/etc/apache2/conf-available/my-gitea.conf`:

```apache
<Location /gitea/>
    ProxyPass http://localhost:3000/
</Location>

```

Then

```auto
sudo a2enconf my-gitea
systemctl reload apache2

```

See other configuration files in `/etc/apache2/conf-available/` provided by FreedomBox.

---

<div class="post-metadata">

### Author: ![homer77](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/homer77/32/283_2.png) [@homer77](https://discuss.freedombox.org/u/homer77)
#### Post date: [March 31, 2020, 8:19pm UTC](https://discuss.freedombox.org/t/solved-howto-setup-a-subdomain-and-reverse-proxy-in-fbox/773/3 "2020-03-31T20:19:00Z")

</div>

Yes, that’s definitely easy! 😆

For gitea I had to add another line to make it work:

```auto
<Location /gitea>
    ProxyPass http://localhost:3000 nocanon
    ProxyPassReverse http://localhost:3000
</Location>

```

And even if I liked to have a subdomain … That’s fine for me. Especially since all the other services run with a path also. That’s at least a clear standard 😉

Thanks again for fast and proper help 💜

Now I have a complete git platform including issue management and ssh again and that is really easy to setup and update.

**Update**  
My former goal of [having a proper subdomain](https://ismus.net/ikiwiki/HomersTec-Fiddle-Blog/_ReverseProxy/#To_a_Subdomain) is to be solved classically how it’s done with apache servers.

---

<div class="post-metadata">

### Author: ![NickA](https://discuss.freedombox.org/letter_avatar_proxy/v4/letter/n/3ab097/32.png) [@NickA](https://discuss.freedombox.org/u/NickA)
#### Post date: [July 10, 2020, 7:13pm UTC](https://discuss.freedombox.org/t/solved-howto-setup-a-subdomain-and-reverse-proxy-in-fbox/773/4 "2020-07-10T19:13:12Z")

</div>

> [@homer77](#):
>
> [having a proper subdomain](https://ismus.net/ikiwiki/HomersTec-Fiddle-Blog/_ReverseProxy/#To_a_Subdomain) is to be solved classically

Hi, thanks for posting that really good info.

Is there a proper “official” place to post such expert hints and configs?

Maybe a tweaks section in [FreedomBox/QuestionsAndAnswers - Debian Wiki](https://wiki.debian.org/FreedomBox/QuestionsAndAnswers) ?

---

<div class="post-metadata">

### Author: ![Sunil](https://discuss.freedombox.org/user_avatar/discuss.freedombox.org/sunil/32/8_2.png) [@Sunil](https://discuss.freedombox.org/u/Sunil)
#### Post date: [July 11, 2020, 4:33am UTC](https://discuss.freedombox.org/t/solved-howto-setup-a-subdomain-and-reverse-proxy-in-fbox/773/5 "2020-07-11T04:33:34Z")

</div>

We tend to collect most of the information on the manual pages of the corresponding apps. Anything that is not appropriate there can be gathered on questions and answers page. Feel free to edit the wiki pages.
