run Gitea behind a proxy

created onAugust 29, 2025

This has the advantage that I don’t have to remember the port on which Gitea is running and can just type into my browser’s address bar.

Edit section in , value to resemble the URL under which gitea should be accessible.

I’m using Apache httpd as a proxy. Here are the relevant lines in section of Apache’s :

<VirtualHost *:80> ... ProxyRequests Off ProxyPreserveHost On RequestHeader set X-Forwarded-Proto "http" ProxyPass /gitea https://idoru:3000 nocanon ProxyPassReverse /gitea https://idoru:3000 ...
When running Gitea behind a proxy, I’m no longer able to access Gitea under https://idoru:3000. That is, I can access Gitea under that address and port directly, but the page is broken and looks like shit, telling me that some Javascript couldn’t be loaded. Anyway, I’m not using https://idoru:3000 so didn’t investigate into this.
x