Enforcing https on the secondary site

Keywords: WordPress Multisite - Microsoft Azure - Technical issue - Secure Connections (SSL/HTTPS)

bndiagnostic ID: a7bb9961-90bb-8a55-1700-4fc8ac5f2ea0

bndiagnostic output:

? Apache: Found possible issues
? Connectivity: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/general/faq/administration/use-firewall/

bndiagnostic failure reason: The suggested guides are not related with my issue

Description:
Hi,
I am running Wordpress Multisite on Microsoft Azure. I set up the primary and secondary websites and used the lets encrypt tool to create the SSL certificates. The certificates are working fine and if I go to both website addresses, with https, everything works fine. My problem is with the second website that does not enforce the https redirection. So if the user enters www.domain2.com or just domain2.com, it will show the website in plain http. I went through almost all the forum posts here and nothing helped.

Hi @1qr7qyisr,

The following guide shows how you can enforce HTTPS for Apache on Azure.

https://docs.bitnami.com/azure/apps/wordpress/administration/force-https-apache/

Regards,
Michiel

Hi,
Thanks for getting back to me. I have already went through the link you sent and make the modifications. However no luck. I started using Cloudflare and it actually did the trick for forcing the HTTPS. But I was still hoping to get some guidance about my setup as I run the bndiagnostic tool.

Hi @1qr7qyisr,

I’m not sure I understand, do you mean that the secondary site HTTPS redirection is now working?

Regards,
Michiel

Yes, you are correct. The secondary site HTTPS redirection works now because the Cloudflare is handling the enforcement. However, if I remove the Cloudflare, still my Bitnami setup is not configured correctly to enforce the HTTPS redirection on the secondary site.

Hi @1qr7qyisr,

The guide for forcing HTTPS should work by adding the redirection rules for each individual virtual host. Can you share the snippet for each virtualHost?

Regards,
Michiel