I have installed the Tech and Me Nextcloud VM which is up and running and everything works including SSL with letsencrypt. However. I have to type the whole thing in a new browser. https://mydomain_name.com. If I just type in the address without the https it won’t work and times out. Is there a way I can force https when typing in the just the address mydomain_name.com.
Hmmm. Yes. Once I asked the question I thought better to get off my ass and do some of my own homework I found the files and location where the virtual site info is kept. enabled-sites and available-sites. I did the edit there by adding the word “permanent”, which was missing but that didn’t work. What I found is that if I left the browser long enough to time out then my domain name would be appended with port number 8080, so domain_name.co.uk/8080. So I added this port to my enabled-sites, restarted the server but still no change…
I know I’m missing something or doing something stupid!!
Thanks for your help so far. It does make me go away and read up stuff so I’m grateful for the advice etc. I’m learning!
It’s not quite a docker it’s QNAP virtualization station. The port 8080 is used for accessing the NAS web interface. I tried to change the port number from 8080 to 8585 but the result was the same, of course it would be, I realised that later. if I use a cleared browser and insert the address with out any http protocol it times out with just the address and :8585 appended at the end.
I have also restarted the server everytime I change the apache file.
When I set up certbot on my Apache reverse proxy, it set up forcing HTTPS for me. It used a rewrite instead of a redirect, but either should work. Technically speaking, I believe redirect is supposed to be the “official” mechanism for doing this.
I run the reverse proxy on the host OS running Docker.
Thanks to your pointers, some reading, trial and error etc, https only is working!! The QNAP NAS has this app called Networking and Virtual Switch. I have two NICs in my NAS which where trunked together. If you run a virtual machine, which my nextcloud instance is, then you have to separate the NICs and create a virtual switch for the VM whci si then routed to the physical adapter. So all good. Played with the Virtual Hosts file to check what happens with different settings in that file, just to learn what goes on and how it works. Good learning was had…