How to change from http to https?

49 views
Skip to first unread message

C K

unread,
Mar 24, 2025, 3:28:12 AMMar 24
to QATrack+
Hello together, 
my clinic wants us to change QATrack+ from http to https. Unfortunately, just changing the HTTP_OR_HTTPS - entry in settings.py didn't do the trick. 

Can anyone explain how to do this? 
As I figured, I need to create a certificate and change something in Apache, but I don't get it. 

It is crucial for me to do this, because without this change we're not allowed to use QATrack+ any more. 

Thanks a lot 

tbe...@gmail.com

unread,
Mar 24, 2025, 4:39:15 AMMar 24
to QATrack+
Hi,

you will have to change your apache config and provide certificate files. Depending on your distribution you should find a qatack.conf under /etc/apache2/sites-enabled/. The QATrack+ config should start with a <Virtualhost *:80>. Change this to port 443 and include the certificate information (you might need to enable ssl via 'sudo a2enmod ssl'):
<VirtualHost *:443>
    SSLEngine On
    SSLCertificateFile /etc/apache2/ssl/qatrack_2024.cer # change path to match the certificate you got from your IT department
    SSLCertificateKeyFile /etc/apache2/ssl/server.key

You can then change the QATrack+ Settings HTTP_OR_HTTPS to "https".

I prefer to use apache mod_rewrite, which redirects/rewrites all urls to https even if somone tries http. After enabling mod_rewrite via 'sudo a2enmod rewrite' add the following to your apache qatrack.conf

<VirtualHost *:80>
    RewriteEngine On
    RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>

Don't forget to restart your apache service after you changed the settings. You can also check for config error with 'apache2ctl configtest'.

Regarding the certificate: Modern browsers are quite picky when it comes to certificates. You should get in touch with the colleagues that run your CA to get a SOP how to create one for your server.

I hope that helps a bit.

regards
Thomas

C K

unread,
Mar 24, 2025, 5:12:17 AMMar 24
to QATrack+
Thanks a lot, mate!

I will try this. Unfortunately I will have to create my own certificate because this is a classic piece of shadow IT. Its not a secret that we use this workaround and we are allowed to do so, but  I will not get any official support from IT.
Wen run QAT on a virtual machine (Ubuntu) on a server (Win Server 2016). This Server ist part of our Varian Domain (so we can access QAT from every Workstation), but it is not part of the official IT infrastructure. Hence the whole Varian domain ist offline, we never thought about http as a problem. Now we have to change this. 

But, like I said, thanks a lot. I will give it a try
Reply all
Reply to author
Forward
0 new messages