Https removed after update

Dear friends of the cloud,

after I do an upgrade, my .htaccess file is overwritten, and the sentivite beginning

RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

is lost.

Actually the upgrade should make the cloud safer and not unsafer by removing forced https redirect.

Any hints or comments on that to prevent it get lost the next time we do an upgrade?
( this nextcloud instance is on a hosted server, where I don’t have access to Apache VirtualHost file)

As usual several different ways exist to get https redirects set-up. Do not customize the
.htaccess file and use a custom web server configuration instead, as described here in
the paragraph Redirect HTTP to HTTPS on Apache Virtual Host

1 Like

Hi j-ed as written im my first post, this is a managed hosted server where I dont have access to /etc where lay apache config files

Usually I would expect that it should be possible to configure all virtual host related parameter
via a kind of web gui in a hosted environment, including the https redirects.

1 Like

I will confront the provider with that now.

The provider answered like this (i translate)

… unfortunatly configuration for virtual host are not part of “classic” hostingpackages.
Kind of those freedoms you have when you upgrade to our root-server-products …

so, how can I prevent this to happen again on next upgrade? without doing a root-server-product upgrade from the provider

as the .htaccess file is part of the package, i see no other solution then having this customization applied after each update or look for another hoster.