Virtualmin on GDPR-Compliant Club Websites: Automatic TLS Certificates with Let's Encrypt, HSTS and OCSP Stapling
This is how you set up automatic Let's Encrypt certificates, HSTS and OCSP stapling on a Virtualmin server – for a secure, GDPR-compliant club website without cloud services.
Clubs often face the challenge of operating a secure and privacy-compliant website. Cloud services may be convenient, but they raise questions about data protection. With Virtualmin on your own server, you can retain full control while also using modern security standards such as automatic TLS certificates, HSTS and OCSP stapling. In this article, we will show you step by step how to set this up.
Why GDPR-compliant club websites are important
The GDPR requires that personal data be processed securely. This also includes encrypted transmission via HTTPS. Many clubs use shared hosting or cloud solutions where it is unclear where the data is stored. Your own virtual server or a web hosting package from a German provider such as DezHost gives you the necessary control and transparency.
Install Virtualmin and create the basics
Virtualmin is a powerful open-source control panel based on Webmin. It enables the management of domains, email accounts, databases and much more. For our purposes, we assume that you have already installed a server with Virtualmin. If not, you can quickly set up a corresponding image on a virtual server from DezHost.
After installation, log in to Virtualmin and select the domain for which you want to set up TLS.
Set up Let's Encrypt automatically
Let's Encrypt offers free TLS certificates that can be renewed automatically. Virtualmin has integrated support for Let's Encrypt.
Step 1: Prepare the domain
Make sure that your domain points to the server's IP. You can register or manage your domain with DezHost. The DNS records should be set correctly.
Step 2: Activate Let's Encrypt in Virtualmin
- Go to Virtualmin > Select Server > Server Configuration > SSL Certificate.
- Select the Let's Encrypt tab.
- Enable the Automatically renew certificate option.
- Enter your email address and accept the terms.
- Click Request Certificate.
Virtualmin takes care of validation and installation. Renewal occurs automatically before the certificate expires.
Configure HSTS header
HSTS (HTTP Strict Transport Security) forces browsers to use HTTPS exclusively. This prevents downgrade attacks and is an important security component.
Enable HSTS in Apache or Nginx
Depending on the web server (Apache or Nginx), add the HSTS header. In Virtualmin, you can do this via the web server configuration.
For Apache: Add the following in the .htaccess or the virtual host configuration:
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
For Nginx: Add the following in the server block configuration:
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
Note that HSTS only takes effect if the site is already reachable via HTTPS. Test thoroughly beforehand.
Set up OCSP stapling
OCSP stapling improves loading time and privacy because the browser does not have to perform the certificate check directly with the CA server. The web server fetches the OCSP response and delivers it along with it.
Enable OCSP stapling in Apache
Add the following in the SSL configuration:
SSLUseStapling on
SSLStaplingCache "shmcb:/var/run/ocsp(128000)"
Restart Apache.
Enable OCSP stapling in Nginx
In Nginx, OCSP stapling is enabled by default if the certificate contains the corresponding extension. You can explicitly enable it:
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /path/to/ca-bundle.crt;
Virtualmin manages the certificates, so the path to the CA bundle should be correct automatically.
Verification and tests
After setup, you should test your configuration. Use tools such as SSL Labs or securityheaders.com to check security. Aim for an A+ rating.
Make sure that automatic renewal works by checking the logs or performing a manual renewal test.
Conclusion
With Virtualmin, Let's Encrypt, HSTS and OCSP stapling, you can operate a secure and GDPR-compliant club website without relying on cloud services. Your virtual server or web hosting with DezHost provides the ideal basis. If you have any questions, our support is available to you.
