How to Force HTTPS in Vhost

#1
hi

I want to add force HTTPS redirect in vhost without using web admin because my web admin is open in read-only mode.
is there any way to force HTTPS redirect like we do in apache Redirect permanent / https://domain.com/
I have added this in my vhost but it does not work
rewrite {
enable 1
RewriteCond %{SERVER_PORT} ^80$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
}
 

Cold-Egg

Administrator
#4
then you could set 9 to the rewriterule debug log, and tail the error log and share here.
Code:
tail -f /usr/local/lsws/logs/error.log
 
Top