I am new to Gitea and excited to start using it. I have a server running Fedora 34 that I use for hosting all of my services. It is configured to use Apache as its primary web service and I have SSL certificates working. After installing Gitea using the default localhost:3000 settings, I was able to confirm it was working. I then set out to set up a reverse proxy using Apache in order to be able to reach it using git.mydomain.com/git/, per the Gitea documentation. I also followed Gitea’s guide on configuring Gitea to use HTTPS. I made the required changes to my Apache and Gitea configuration files, then restarted both services. I now get a 503 Service Unavailable page when I try to visit https://git.mydomain.com/git. Both services are still running according to systemctl, and there are no log files present in the log directory listed in my Gitea configuration. I am not sure where to go from here in terms of troubleshooting. Can anyone assist?
And here is the gitea.conf file I created in /etc/httpd/conf.d. I copied this verbatim from the Gitea instructions page (under the “Apache HTTPD with a sub-path” section), but perhaps I am missing something?
<VirtualHost *:80>
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
AllowEncodedSlashes NoDecode
ProxyPass /git http://localhost:3000 nocanon
</VirtualHost>
If you use a reverse-proxy with Apache, you set-up SSL on Apache and no SSL (or, preferably, fastcgi) on gitea. It is the service that directly faces the user that performs all the SSL processing.
If you (incorrectly) insist on SSL in Apache–gitea link over localhost, there should be ProxyPass /git https://localhost:3000 nocanon, but with no SSL on Apache the users would still connect via plaintext http with it.
USER ------------- Apache -------------- Gitea
^ ^
You need SSL here not here