Https rewrite not doing anything

I set up the https using my nextcloud.conf in
[/etc/apache2/sites-avaliable/nextcloud.conf] (ubuntu system)
useing (from the top of the file, to the relevant settings):

<VirtualHost *:80>

#### Redirect to port 443 ###
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]

also of note is that I configured it so that so it is just

demo.com

not

demo.com/nextcloud

I’m not sure if that effects anything…

so the rewite doesn’t do anything, I have tried to go to the page from a livecd browser, so I know it isn’t something on my machine
https DOES work if I manually type it in, I’m thinking it should be done with out my input though.

maybe you can try
’overwriteprotocol’ => 'https’
in your config/config.inc

You could also use redirect instead of rewrite and redirect all requests to https.

<VirtualHost *:80>
    ServerName demo.com
    Redirect permanent "/" "https://demo.com/"
</VirtualHost>

what I ended up doing was to run

sudo a2dissite 000-default

that seemed to be the problem