On 11/10/18 16:59, Per Jessen wrote:
Paul Groves wrote:
Hi All,
So I have just set up ssl on my new web server as you may have seen from my other thread.
Now in the default apache config for HTTP I have simply added the following to redirect to the virtualhost I wish to see as default: RewriteEngine on RewriteCond %{SERVER_NAME} =www.mysite.com
s/=/!/ ?
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
So now what happens when I type in the IP or local hostname of the server, and by extension any other ServerName which is not defined in the apache config, I get redirected to www.mysite.com
But I wish to achieve this with the default HTTPS site too. snip] So my question is, how can I redirect all HTTPS requests by default to my www.mysite.com site without getting certificate errors? Can this be done?
Nope, can't be done.
Well that is a pain. I imagine this would be a very useful feature to a lot of people. I guess I'm not understanding completely what you're trying to achieve, Paul. Could you elaborate? I don't have indepth knowledge, but have puzzled out some vhost constructions that might help you achieve what you want. F.e. my music subdomain is an (almost) empty vhost with a proxy to music2 domain at my home IP. This no doubt will require some changes your setup. FWIW I don not use rewrites in my apache configs. On a number of occasions
Op donderdag 11 oktober 2018 20:48:46 CEST schreef Paul Groves: they appeared to be the culprits in f.e. Owncloud/Nextcloud not working properly. -- Gertjan Lettink a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org