Https redirect for router Admin Panel

I’m using a Beryl AX with firmware v4.4.6. In older versions using lighttpd, I followed the instructions in this post to redirect all http requests to https. But now the webserver is nginx, and I’d like to know if it’s possible to do the same thing.

On the router, in the file /etc/config/oui-httpd, I changed option redirect_https to '1', and that works for the basic GUI, but doesn’t apply to the LuCI web interface. Is there also a simple change I can make for https redirection with both interfaces?

Didn’t tried it, but should work I guess: https://openwrt.org/docs/guide-user/luci/luci.secure#enable_luci_https_redirect_from_http

Thanks for the reply. I followed those instructions, and the variable uhttpd.main.redirect_https maintains its value even after a reboot. But it doesn’t seem to have any effect. Redirection does not occur, and I can still log in to LuCI over http.

uci set oui-httpd.main.redirect_https='1'
/etc/init.d/nginx restart

It’s a feature that can be turned on since firmware 4.5

1 Like

That did it! I guess the uci command changes more than just the redirect_https variable in the oui-httpd config file. Thank you!