I have a sub-domain I want to install a valid SSL (possibly free SSL). I used to access my website through the public address of my server. Now I am using subdomain to access my website. I want to add a valid SSL to my server to secure my website. I am using XAMPP. How can I install SSL properly because when I access my website using HTTPS I am getting a NET::ERR_CERT_AUTHORITY_INVALID and where can I get a valid SSL Certificate?
4
Answers
Arguably most popular free SSL Provider (and the one I use) will be LetsEncrypt.
Steps for installation will vary based on OS, like this for Ubuntu
The most popular Free SSL certificate you can get from letsencrypt.
Than here is the steps you can get your certificate works on localhost machine (XAMPP):
Change {{DOMAIN}} text using the domain we want to use, in this case site.test and save.
Double click the make-cert.bat and input the domain site.test when prompted. And just do enter in other question since we already set the default from cert.conf.
Double click on the server.crt to install it on Windows so Windows can trust it.
And then Select “Place all certificate in the following store” and click browse and select Trusted Root Certification Authorities.
5.1 Open notepad as administrator.
5.2 Edit C:WindowsSystem32driversetchosts (the file have no ext)
5.3 Add this in a new line:
This will tell windows to load XAMPP when we visit http://site.test You can try and it will show XAMPP dashboard page.
We need to enable SSL for this domain and let XAMPP know where we store the SSL Cert. So we need to edit C:xamppapacheconfextrahttpd-xampp.conf
And add this code at the bottom:
After that, you will need to restart Apache in XAMPP. It’s very simple, simply open XAMPP Control Panel and Stop and re-Start Apache Module.
You may get free ssl using this link [1]. You need to select the Software that you’re using for example Apache and select what operating system you are using in my case I am using Debian 9. If you’re unsure about your system, you need to ssh to your server and execute the command “$ cat /etc/*release” if you’re using Linux.Once you have selected the correct software and system, it will give you instructions on how to get SSL.
You may follow the instructions here [2] on how to install SSL.
Hope this information helps you.
[1] https://certbot.eff.org/lets-encrypt/debianstretch-apache
[2] https://www.sslshopper.com/apache-server-ssl-installation-instructions.html
The most common solution of free SSL is LetsEncrypt.
LetsEncrypt provides a variety of clients for most OSs. I recommend using the client ACMESharp.
Follow the following steps on Powershell (as described in the official documentation of the project)
1) Install ACMESharp
2) Initialize the vault
3) Create new ACME registration using email
4) Submit the domain identifier
5) Handle the Challenge to Prove Domain Ownership
If you do not get the challenge details like file path and content in the output , try this:
You’ll probably have to allow hidden locations to be accessed via apache, so the challenge can reach .well-known location.
You could use something like the following config, depending on your custom needs (as mentioned in this post as well):
6) Submit the Challenge Response to Prove Domain Ownership (HTTP method)
The challenge does not get updated instantly so try updating on the results until it’s valid.
Once it’s valid, try:
7) Request and Retrieve the Certificate
The certificate might not be issued instantly so try:
Until it’s ok.
8) Export the public and private keys
Private key:
Certificate signing request:
Lets encrypt public certificate:
Issuer’s public certificate:
You don’t practically need all of the above, anyway, but the private key is absolutely necessary so keep it safe.
For more documentation visit the github repo of the project.