Hi, do guys know if is possible to install a SSL certificate on serverpilot but no by the panel? I mean, i have the free plan so that option is not available. Can i do it by my self?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Answering here in case others are searching for a solution:
ServerPilot uses Nginx as the public facing web server and proxies the requests to Apache. So, we have to add our SSL configuration to Nginx.
Steps:
Login to the server using SSH
Create a directory to hold the certificate and key files.
Copy the certificate (.crt) and private (.key) files to this directory. Replace domain_name with your domain name.
Add custom SSL configuration here:
Replace APP_NAME with your actual app name (website). Put this inside the file APP_NAME.ssl.conf:
As usual, replace APP_NAME, domain_name, certificate_file and privatekey_file with your own values.
Restart Nginx
That’s it. The SSL certificate is installed.
I recently wrote a detailed tutorial for it… The actual SSL installation and configuration on ServerPilot will take less than 10 minutes. You can check it out over here:
https://www.blogmehow.com/how-to-manually-install-ssl-on-serverpilot-free-plan-1331/
Let me know if it helps…
NikhilSharma thanks heaps!!
Here’s the final .ssl.conf file with the changes incorporated from the comments above.
Make sure you replace APP_NAME, domain_name, certificate_file and privatekey_file with your own values.
If your paths are incorrect you will either get an error when your restart Nginx or a 403 error when you visit your website.
Restart Nginx