Content
503 Error in browser using Apache with proxy+SSL and Docker installed OP
Added by Henrik Soederlund over 4 years ago
Hi!
I have a CentOS8 server running, with Docker Engine and docker-compose installed (I'm a newb on Docker btw). I have Apache (httpd) installed normally through dnf and have configured a VirtualHost file according to the OP installation guide. I have added my Cloudflare Origin certificates and they seem to work fine (project.pars.work) through Apache.
OpenProject is run via Docker, using this command: docker-compose up -d
My virtualHost file is like this:
<VirtualHost *:80>
ServerName project.pars.work
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*)$ https://%{SERVER_NAME}/$1 [R,L]
<VirtualHost *:443>
ServerName project.pars.work
SSLEngine on
SSLCertificateFile /etc/ssl/crt/server.crt
SSLCertificateKeyFile /etc/ssl/crt/server.key
RewriteEngine on
RewriteRule "^$" "/" [R,L]
ProxyRequests off
<Location "/">
RequestHeader set X-Forwarded-Proto 'https'
ProxyPreserveHost On
ProxyPass http://localhost:8080/
ProxyPassReverse http://localhost:8080/
</Location>
</VirtualHost>
Here are a few outputs:
netstat -tlpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 720/sshd
tcp6 0 0 :::80 :::* LISTEN 13915/httpd
tcp6 0 0 :::8080 :::* LISTEN 8745/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 720/sshd
tcp6 0 0 :::443 :::* LISTEN 13915/httpd
wget -p http://localhost:8080
--2020-04-24 20:22:42-- http://localhost:8080/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8080... connected.
HTTP request sent, awaiting response... 503 Service Unavailable
2020-04-24 20:22:48 ERROR 503: Service Unavailable.
I am not sure what is wrong it this point. Is someone able to help steer me in the right direction?