Client sent an HTTP request to an HTTPS server.

#1
hi everyone. I'm using cyperpanel with OLS. when I do reverse proxy to my docker it gives me the error :

the client sent an HTTP request to an HTTPS server.

I was following this guide I'm not sure what I'm doing wrong.

what I did is :

- the docker exposed ports as 9090:80

- i put the following in /usr/local/lsws/conf/httpd_config.conf
Code:
extprocessor docker {
  type                    proxy
  address                 127.0.0.1:9090
  maxConns                100
  pcKeepAliveTimeout      60
  initTimeout             60
  retryTimeout            0
  respBuffer              0
}
then added the following to Rewrite Rules in subdomain.domain.com


Code:
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
REWRITERULE ^(.*)$ http://docker/$1 [P]
when visiting https://subdomain.domain.com it gives me that error
but when i visit https://subdomain.domain.com:9090 it works fine.

any help would be appreciated.
 
#2
after some big-time researching and trying things out, i got it fixed.

for anyone else having this issue, ill save you some time looking around.

just make sure that when you add the snippet in httpd_config.conf put it with HTTPS as follows

Code:
extprocessor docker {
  type                    proxy
  address                 https://127.0.0.1:9090
  maxConns                100
  pcKeepAliveTimeout      60
  initTimeout             60
  retryTimeout            0
  respBuffer              0
}
 
Top