http-server icon indicating copy to clipboard operation
http-server copied to clipboard

SLL mode does not serve HTTP request

Open 73k05 opened this issue 8 years ago • 4 comments

Hi,

I would like to know how can I redirect all my http requests to https.

Now I start my server like this: http-server -a 0.0.0.0 --cert self-signed.crt --key self-signed.key -d false -p 4041 -c-1 --ssl

The log: Starting up http-server, serving ./ through https Available on: https://127.0.0.1:4041 https://192.168.0.25:4041 https://10.0.0.1:4041 Hit CTRL-C to stop the server

I routing works on https:// URLs but not on http:// URLs. How can I automatically redirect all http:// URLs to https:// URLs.

Do I need to use NGINX or is there something I can do with http-server configuration?

Thank you for great development. Olivier

73k05 avatar May 11 '16 09:05 73k05

@BigBlueHat @Qism0 Do we already have this option in http-server? or some pending PR's which I can try.

I wanted to redirect http://127.0.0.1:8080 to https://127.0.0.1:80443

Thanks in advance for you suggestion.

parthitce avatar Mar 09 '18 23:03 parthitce

Same issue encountered.

Lucien-X avatar Jan 31 '19 07:01 Lucien-X

+1

damianobarbati avatar Aug 24 '19 15:08 damianobarbati

This issue has been inactive for 180 days

github-actions[bot] avatar Jan 12 '22 12:01 github-actions[bot]