my APP load fine in localhost:8080, how I can send this as response to ANY request to HTTPS://hn.mydomain.com ?

#1
hello.

using DOCKER I install [APP] and this run fine in localhost:8080

but when ANY CLIENT open HTTPS://hn.mydomain.com:8080 this load "perfect", but the browser launch WARNNING about certificate.

Then my best solution is send ANY REQUEST to HTTPS://hn.mydomain.com with response from localhost:8080


  1. is possible?
  2. if yes, how I can do it?

currently the URL https://hn.mydomain.com load 100% perfect and also https://mydomain.com (SSL load 100% green)
domain and DNS are propagated from weeks back, this box is ALMALINUX 8, and of course I am using OpenLiteSpeed, :)

thanks by yours instructions.
 
#3

Attachments

#5
Follow the doc, once you setup the external app, then you can set up the proxy with rewriterule.
https://docs.openlitespeed.org/docs/advanced/proxy#method-1-proxying-with-rewrite-rules
e.g.
Code:
RewriteCond %{HTTPS} !=on
REWRITERULE ^(.*)$ HTTP://p1/$1 [P,L,E=PROXY-HOST:hm.mydomain.com ]
RewriteRule ^(.*)$ HTTPS://p1/$1 [P,L,E=PROXY-HOST:hm.mydomain.com ]
thanks master, I do this 2 actions:
  1. create file .htacces .htaccess INTO dir [/home/hn.mydomain.com/public_html]
  2. into this .htaccess file, I put yours 3 llines (changing ONLY: hm.mydomain.com by "my REAL hostname"
  3. I restar LSWS, then nothing happen, by this, I reboot the whole server and then: https://hn.mydomain.com load ERROR 500
  4. I see into [/usr/local/lsws/logs/error.log] and message is:
    Code:
    [*]2024-05-08 22:10:03.227317 [ERROR] [1403] [REWRITE] Rewrite target require HTTPS, Proxy target is not HTTPS, please change 'web server' 'p1' using https://... address
how I can fix ?

logic: https://localhost:8080 will return WRNINGS ! ( I open this days back using WGET )

thanks again!
 
Top