At the moment the CLI will setup a blog on the host you specify, if that is (for example)
https://www.elliotblackburn.com and will only create nginx configurations for that host. If someone tries to navigate to the http version (
http://www.elliotblackburn.com) they’ll be met with a standard “welcome to nginx” page.
It’s very straight forward to dive into the nginx config and setup a redirect, but I feel like this should be an option offered by the CLI to handle rather than editing the nginx file specifically. This introduces probably a few design questions.
- Should it default to redirecting http -> https if SSL is turned on?
- Should it serve http and https requests, though this might require changes in the main ghost project as well as the CLI.
I feel like if I turned on SSL, it should offer to redirect http traffic for me as an option, or do it automatically since most browsers are moving towards global SSL these days, but that’s probably up for debate.