0

I can forward port 8000 to 443 using localtunnel

npm install -g localtunnel

Then use it with lt -p 8000

I got my local port exposed to internet with subdomain https://random-xxx-xx.loca.lt

What software can forward http port to https in local only ?

From http://localhost:8000 to https://localhost

1 Answer 1

1

You can use NGINX proxy_pass directive

using this config for example:

server {
    listen 127.0.0.1:8000;
    proxy_pass https://127.0.0.1:443;
}
5
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Jan 7, 2023 at 1:34
  • Good recomends, but are you know more simple than NGINX proxy pass , i found ssl-proxy , npm install -g ssl-proxy and use it with ssl-proxy --source 443 --target 8000 , the problem is when visiting 'localhost.dev', browser cant load, because ssl error, I've edit my /etc/hosts with 127.0.0.1 localhost.dev
    – Anas
    Commented Jan 7, 2023 at 6:23
  • @LexaVey .dev is Top Level Domain, it doesn't work without record in /etc/hosts or DNS server, only localhost is by default resolved to 127.0.0.1 Commented Jan 8, 2023 at 17:07
  • I've mention I've edit my /etc/hosts with 127.0.0.1 localhost.dev
    – Anas
    Commented Jan 9, 2023 at 4:55
  • anyway, my real problem is my url only on http and has running in port 8000, i want develop local with https://local.com, offcourse need edit /etc/passwd file, now i am only can use localhost with ssl-proxy i cant use https://local.com, i dont know why
    – Anas
    Commented Jan 9, 2023 at 5:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.