79211405

Date: 2024-11-21 13:42:58
Score: 1.5
Natty:
Report link

😭 I found a way and it's working as intended. I am still not sure if it's right method (since I am new to vhost customization and all) but here you go:

I just edited the vhost files for my example.com for port 80 (vhost.conf) in litespeed folder.

What I changed in the file was a simple line of code:

extprocessor 30000 {
  type                    proxy
  address                 https://127.0.0.1:30000
  env             NODE_ENV=production
  maxConns                5 
  initTimeout             20
  retryTimeout            20
  respBuffer              0
}

I just changed the address 127.0.0.1:30000 to address https://127.0.0.1:30000

Now, example.com is:

https://example.com is

  1. Firefox - working without problems
  2. Edge/Brave/Chrome - working without problems

http://example.com:30000 is

https://example.com:30000 is

this was done with nodejs using:

https.createServer(options, app).listen(30000, ()=>{
console.log("Running at port 30000");
});

and in options:

const options = {
    key: fs.readFileSync(path.resolve("example.com.key")),
    cert: fs.readFileSync("example.com.crt"),
    ca: fs.readFileSync(path.resolve("example.com-ca.crt"))
};

ca file(s) might not be available under your control panel's ssl folder. Mine works even when I omit the ca key-value pair.

P.S. Last night copilot broke my brain after serving me an answer where the code asked http and https to listen to port 30000, and then copilot itself said one port cannot be assigned to two different things. 😭 I quit copilot then and there.

Reasons:
  • RegEx Blacklisted phrase (1.5): I am new
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Loves chicken