Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

How to add self signed SSL certification?

Hello.
How can I add my own SSL certification to Apache?

Thank you.
(Mar 15, 2019 06:38 AM)hack3rcon Wrote:  Hello.
How can I add my own SSL certification to Apache?

Thank you.

Just add these lines to your virtualhost config:
Code
SSLEngine on
SSLCertificateFile /etc/ssl/crt/primary.crt
SSLCertificateKeyFile /etc/ssl/crt/private.key
SSLCertificateChainFile /etc/ssl/crt/intermediate.crt

I am not sure is this necessary nowadays, but I think no. Anyways, if you get error about missing ssl engine, then use this.
If you don't enabled yet ssl module, then use this command before restart:
Code
sudo a2enmod ssl


and then you can restart your apache:
Code
sudo systemctl restart apache2
(Mar 15, 2019 07:08 AM)G3ph4z Wrote:  Just add these lines to your virtualhost config:
Code
SSLEngine on
SSLCertificateFile /etc/ssl/crt/primary.crt
SSLCertificateKeyFile /etc/ssl/crt/private.key
SSLCertificateChainFile /etc/ssl/crt/intermediate.crt

I am not sure is this necessary nowadays, but I think no. Anyways, if you get error about missing ssl engine, then use this.
If you don't enabled yet ssl module, then use this command before restart:
Code
sudo a2enmod ssl


and then you can restart your apache:
Code
sudo systemctl restart apache2

I generated my own keys via below commands:
Code
# openssl genrsa -des3 -out "Website".key 1024
# openssl req -new -key "Website".key -out exmaple.csr
# openssl x509 -req -days 365 -in "Website".csr -signkey "Website".key -out "Website".com.crt
But when I want to browse my website then it show me "Your connection is not private".
why are you using a self-signed certificate ?

https://letsencrypt.org
(Mar 16, 2019 02:45 AM)SuckySucky Wrote:  why are you using a self-signed certificate ?

https://letsencrypt.org

Agreed. You should be using letsenrypt.
[Image: XeoMD0Q.gif]
(Mar 15, 2019 11:49 PM)hack3rcon Wrote:  I generated my own keys via below commands:
Code
# openssl genrsa -des3 -out "Website".key 1024
# openssl req -new -key "Website".key -out exmaple.csr
# openssl x509 -req -days 365 -in "Website".csr -signkey "Website".key -out "Website".com.crt
But when I want to browse my website then it show me "Your connection is not private".
Did you do anything that he said? lol
XMPP: pm me


Possibly Related Threads...
Thread / Author Replies Views Last Post
by hack3rconAug 30, 2019 02:30 AM 7 302 Aug 30, 2019 02:30 AM
Last Post: ahears
by cewaNov 20, 2015 08:42 PM 2 176 Nov 20, 2015 08:42 PM
Last Post: wander is a multi dwc
by AnidektwistApr 24, 2015 01:29 AM 2 290 Apr 24, 2015 01:29 AM
Last Post: w34k