Ensure that blog login page always redirects to https
This commit is contained in:
parent
4f2c5e44b0
commit
5a60a8f29d
|
@ -6966,6 +6966,11 @@ function install_blog {
|
|||
echo ' limit_conn conn_limit_per_ip 10;' >> /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME
|
||||
echo ' limit_req zone=req_limit_per_ip burst=10 nodelay;' >> /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME
|
||||
echo '' >> /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME
|
||||
echo ' # Always redirect the login page to https' >> /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME
|
||||
echo ' location /login {' >> /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME
|
||||
echo ' rewrite ^ https://$server_name$request_uri?;' >> /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME
|
||||
echo ' }' >> /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME
|
||||
echo '' >> /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME
|
||||
echo ' # rewrite to front controller as default rule' >> /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME
|
||||
echo ' location / {' >> /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME
|
||||
echo ' rewrite ^/(.*) /index.php?q=$uri&$args last;' >> /etc/nginx/sites-available/$FULLBLOG_DOMAIN_NAME
|
||||
|
|
Loading…
Reference in New Issue