Enable HTTPS login for router

For GL-AR750S - Slate: It is all working like a charm
It is working almost out of the Box - https is up and running but not default
I did the following steps to make https the default:

  • ssh to the box
  • Install redirect
    ** opkg update
    ** opkg install lighttpd-mod-redirect
  • edit /etc/lighttpd/conf.d/30-openssl.conf

Original

#######################################################################
##  openssl Module
## ---------------

server.modules += ( "mod_openssl" )

$SERVER["socket"] == "0.0.0.0:443" {
        ssl.engine                 = "enable"
        ssl.pemfile                = "/etc/lighttpd/server.pem"
}

append the following:

else $HTTP[“scheme”] == “http” {
$HTTP[“host”] =~ “." {
url.redirect = (".
” => “https://%0$0”)
}
}

Result:

#######################################################################
##  openssl Module
## ---------------

server.modules += ( "mod_openssl" )

$SERVER["socket"] == "0.0.0.0:443" {
        ssl.engine                 = "enable"
        ssl.pemfile                = "/etc/lighttpd/server.pem"
} else $HTTP["scheme"] == "http" {
    $HTTP["host"] =~ ".*" {
        url.redirect = (".*" => "https://%0$0")
    }
}
  • save 30-openssl.conf
  • restart lighttpd : /etc/init.d/lighttpd restart
  • check your Slate-Site

DONE :slight_smile:

2 Likes