Installing Virtualmin associated with Cloudflare

SYSTEM INFORMATION
OS type and version Ubuntu 20.04
Virtualmin version LATEST

Hello!
I’ve been trying to install Virtualmin on a fresh OS install, but i want to know how to use Cloudflare combined with Virtualmin. The problem is that after i configure it (i am using ns1.mydomain.com on the step that requires the nameserver), change the SSL certificates to my Origin Certificate in Cloudflare, when i try to acces mydomain.com i receive “invalid SSL certificate”. (Set to Full Strict in SSL cloudflare). I even set the CA certificate …

I am trying to know what steps should i follow to make it work with cloudflare nameservers. I specify that i am willing to do another fresh install, using nginx instead apache, if you can provide me some steps to get out of this “hole”.

I am new to this, i’ve been using nginx only until now, but i need a real panel for what i am doing and virtualmin/webmin does the job …

if on virtualmin don’t have a valid ssl …

you should setup on cloudflare full (not strict) or flexible…

and check if cloudflare have this setup
Always Use HTTPS : On
Automatic HTTPS Rewrites: On

of course change on your needs.
thank you

It’s simple. If your domain names are pointed at Cloudflare name servers then all you do is add your domain records and change the IP address to the broadcast IP of your server.

Example: lets say your broadcast IP is 123-456-789. Your domain is itslime.com. You would make an A record for itslime.com and enter 123-456-789 in the content area and save it.

You’ll do that for every domain you have. Virtualmin will take care of the rest. I’ve done it since day one.

1 Like

So basically there’s no need to use Full (Strict) from Cloudflare, right? Because if I’m doing what you are saying, it only works with Flexible iirc.

Based on what you are saying, using cloudflare origin certificates isn’t needed anymore.

Thank you for your both answers!

Never use full strict on Cloudflare. It causes nothing but problems. Always leave it on Flexible.

1 Like

I left it flexbile. But somehow i cant acces it from virtualmin.mydomain.com:10000 (A record added in cloudflare for virtualmin)…

edit: solved by changing the port to one of the cloudflare allowed ports for https. in my case
webmin configuration → changed both 10000 values to 8443.

edit2: even if i am using mydomain.com, or dns1.mydomain.com, or dns2.mydomain.com with the port :8443 at the end, it redirects me to virtualmin. Is it ok?

i setup cloudflare with
www.domain.com with orange cloud (so traffic is proxied by cloudflare)
and
admin.domain.com without orange cloud (grey cloud) so traffic don’t pass to cloudflare network and point to webserver.

thank you

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.