[Containers] Auto redirect http to https for portus web inteface

Aleksa Sarai asarai at suse.com
Thu Mar 17 16:39:27 MDT 2016


> How we can do auto-redirect http to https for portus web interface.
>
> As when we do http, it gives some error but with https it works fine.

Is your Portus server behind Nginx? If so, you can just add the 
following directive:

server {
	listen 80;
	server_name <same as your SSL setup>;

	return 301 https://$host$request_url;
}

You can swap 301 (permanent) for 302 (temporary).

-- 
Aleksa Sarai
Docker Core Specialist
SUSE Australia
https://www.cyphar.com/


More information about the Containers mailing list