I installed gitea 1.7.6 on Unbuntu 18.04 LTS with Apache 2.4.26 and Mysql.
When app.ini configuration had PROTOCOL = https
I an into Problems with letsencrypt
[E] Failed to load https cert file localhost:3000: open /etc/letsencrypt/live/git.arbyte.net/fullchain.pem: permission denied
So I went for the solution provided here and set PROTOCOL = http
.
This is my configuration in app.ini
:
[server]
PROTOCOL = http
ROOT_URL = https://my.domain.tld/
SSH_DOMAIN = my.domain.tld
DOMAIN = my.domain.tld
HTTP_PORT = 3000
HTTP_ADDR = localhost
DISABLE_SSH = false
SSH_PORT = 22
LFS_START_SERVER = true
LFS_CONTENT_PATH = /var/lib/gitea/LFS
Service is running now but doing so gives me this in the Browser:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET / .
Reason: Error reading from remote server
and apache’s error.log:
[proxy_http:error] [pid 28572] (103)Software caused connection abort: [client 84.113.179.56:51972] AH01102: error reading status line from remote server localhost:3000
[proxy:error] [pid 28572] [client 84.113.179.56:51972] AH00898: Error reading from remote server returned by /
[proxy_http:error] [pid 28572] (103)Software caused connection abort: [client 84.113.179.56:51972] AH01102: error reading status line from remote server localhost:3000, referer: https://my.domain.tld/
[proxy_http:error] [pid 28571] (103)Software caused connection abort: [client 84.113.179.56:51973] AH01102: error reading status line from remote server localhost:3000, referer: https://my.domain.tld/
[proxy:error] [pid 28571] [client 84.113.179.56:51973] AH00898: Error reading from remote server returned by /favicon.ico, referer: https://my.domain.tld/
[proxy_http:error] [pid 28571] (103)Software caused connection abort: [client 84.113.179.56:51973] AH01102: error reading status line from remote server localhost:3000, referer: https://my.domain.tld/s$
[proxy_http:error] [pid 28568] (103)Software caused connection abort: [client 84.113.179.56:51974] AH01102: error reading status line from remote server localhost:3000, referer: https://my.domain.tld/s$
[proxy:error] [pid 28568] [client 84.113.179.56:51974] AH00898: Error reading from remote server returned by /serviceworker.js, referer: https://my.domain.tld/serviceworker.js
Any Ideas?
[EDIT]
my apache configuration:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin XXXXX
SSLEngine on
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPassReverseCookieDomain localhost my.domain.tld
ServerName my.domain.tld
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/letsencrypt/live/my.domain.tld/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/my.domain.tld/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
ProxyPreserveHost On
ProxyRequests off
ProxyPass / https://localhost:3000/
ProxyPassReverse / https://localhost:3000/
</VirtualHost>
</IfModule>