How to Install SSL Certificate on Webmin?
The web-based interface of Webmin provides an easy way to administer Linux and Unix servers. Getting an SSL cert on a Webmin server helps provide HTTPS encryption for web traffic; protects sensitive user information; and can increase the trustworthiness of your site and your ranking in a search engine.
In this article, we’ll cover how to create a Certificate Signing Request (CSR) in Webmin and how to install a third-party SSL certificate from a trusted Certificate Authority (CA).
Prerequisites:
Before you begin, you must have:
- Webmin installed (you can get this by accessing your Webmin dashboard).
- An SSL certificate purchased from a CA.
- Administrative/root access to your server.
- A domain name registered and pointing to your server.
How to Create a CSR on the Webmin Server?
Follow the steps mentioned below to create a CSR on the Webmin server:
- Enter your credentials and log into your Webmin interface.
- In the left pane, click the Terminal icon (>_) or press Alt + K on your keyboard.
- The Terminal window will appear.
- In the Terminal window, paste the command below:
detasudo openssl req -new -newkey rsa:2048 -nodes -keyout /etc/ssl/domainname.com.key -out /etc/ssl/domainname.com.csr -subj /C=US/ST=Florida/L=Saint Petersburg/O=Rapid Web Services/OU=Support/CN=domainname; cat /etc/ssl/domainname.csr
Note: You have to change the bold part (highlighted with red) in the above code as per your domain.
- The CSR will be generated.
Here are the details to help you out with the code that you need to enter:
| Field | Description |
| /etc/ssl/example.com.key | The file path where the key is stored. |
| C | Enter the two-letter ISO code of your country. |
| ST | Write the full name of the state, such as Florida. |
| L | Write the full name of the city, like New York. |
| O | Enter the full name of your organization without special characters. For OV or EV SSL certificates, use the legal name of your organization. |
| OU | Name of the department, e.g., Marketing Department. |
| CN | Your domain name, like www.domainname.com or domainname.com. Use an asterisk for Wildcard SSL certificates, e.g., *.domainname.com. |
Now, all that is left is to copy all the content, including —–BEGIN CERTIFICATE REQUEST—— to —–END CERTIFICATE REQUEST—–. Once copied, open a text editor like Notepad ++ and press Ctrl + V to paste the copied content.
With this, your CSR is ready!
Steps for SSL Certificate Installation on Webmin Server
Once you’ve received your signed SSL certificate (which was ordered through a Certificate Authority) by email, you can begin the process of installing it on your Webmin server.
To do this, follow these simple steps:
Step 1: Download and Unzip SSL Files
After successful verification, the first step is to download and unzip the SSL certificate sent by the CA to the registered email ID in the form of a zip folder.
Make sure you have these files:
- .crt file – (Primary certificate)
- .ca-bundle – (root + intermediate certificates)
Step 2: Upload the Files
After a successful download of the two files described in step one, you can now proceed with uploading these files to your webmin server.
To do this:
- Log in to your webmin server using your Admin credentials.
- Select the ‘Others‘ category (in the left-hand pane).
- Select ‘Upload and Download‘ from the list.
- On the upload and download page, click the ‘Upload to server‘ tab.
- Under the ‘Files to upload‘ section, locate both the .crt and .ca-bundle files and attach them to the upload.
Step 3: Configure Apache using Webmin
To configure Apache, please follow the process below:
- You are required to sign in to Webmin, and from there go to the left-menu option of Unused Modules to install Apache if it is not previously set up.
- From there, go to Servers>Apache Web Servers.
- You will now see the Global Configuration tab on the main page for the Apache Web Servers page.
- Select Configure Apache Modules from the Global Configuration tab.
- You will now see a list of the modules available with Apache.
- Find the SSL module, select the checkbox, and then select the Enable Selected Modules button.
- Wait for the main page of Apache to reload.
- After the reload, you will have the option to create a Virtual Host on the next screen with the following information:
- Port: Use port 443, the standard for HTTPS.
- Document Root: Provide the path to your website’s root folder.
- Server Name: Enter your domain name.
- Click the Create Now button to establish your new virtual host.
- In the Existing virtual hosts tab, find the host you just created.
- Click the globe icon placed adjacent to it.
- The Virtual Server Options page will open.
- On the Virtual Server Options page, select SSL Options and adjust the settings as follows:
- Enable SSL: Select YES
- SSL protocols: Uncheck outdated SSLv2 and SSLv3 protocols.
- Certificate/private key file: Input the server paths for your primary certificate (.crt) and private key (.key, created with your CSR).
- Certificate Authorities File: Enter the server path for your bundle file.
Step 4: Restart Apache
Now, all that’s left is to restart Apache. Doing so completes the SSL certificate installation process. Follow the steps mentioned below to accomplish the same:
- In the left pane, click System.
- From the list, click the Boot and Shutdown option.
- Check the checkbox placed adjacent to the Apache checkbox.
- Move (scroll) to the end of the page.
- Click Restart.
Congratulations! You have successfully added and installed an SSL certificate on your Webmin server.
Conclusion
Installing an SSL certificate on a Webmin server helps secure your website with HTTPS encryption, protect sensitive user information, and improve trust among visitors and search engines.
By properly generating the CSR, uploading the SSL files, configuring Apache, and restarting the server services, you can successfully enable secure communication on your Webmin-hosted websites.
Purchase SSL certificates at the best discounted pricing and contact our support team if you need any assistance with CSR generation, SSL installation, configuration, or troubleshooting.