Difference between revisions of "SSL Certificate"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) |
Rafahsolis (talk | contribs) |
||
| Line 12: | Line 12: | ||
# Installing the Private Key and Certificate | # Installing the Private Key and Certificate | ||
#* Apache: | #* Apache: | ||
| − | ## Copy server.crt and server.key to apache conf ssl path | + | ## Copy server.crt and server.key to apache conf ssl path chmod 600 to .key and 644 to .crt |
##:<pre> | ##:<pre> | ||
##:: cp server.crt /usr/local/apache/conf/ssl.crt | ##:: cp server.crt /usr/local/apache/conf/ssl.crt | ||
Revision as of 16:37, 1 April 2016
Fuente: www.akadia.com/services/ssh_test_certificate.html
Generate self signed certificate
- Generate a Private Key
openssl genrsa -des3 -out server.key 1024- (better security)
openssl genrsa -aes256 -out server.key 4096
- Generate a CSR (Certificate Signing Request)
- (YOUR name must be the fully qualified domain name ej: wiki.herrerosolis.com)
openssl req -new -key server.key -out server.csr
- Remove passphrase from key
- -rw-r--r-- 1 root root 891 Jun 29 13:22 server.key
cp server.key server.key.org && openssl rsa -in server.key.org -out server.key
- Generate Self-Signed Certificate
- will generate a temporary certificate which is good for 365 days
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
- Installing the Private Key and Certificate
- Apache:
- Copy server.crt and server.key to apache conf ssl path chmod 600 to .key and 644 to .crt
- cp server.crt /usr/local/apache/conf/ssl.crt
- cp server.key /usr/local/apache/conf/ssl.key
- Configure Configuring SSL Enabled Virtual Hosts
- SSLEngine on
- SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
- SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
- SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
- CustomLog logs/ssl_request_log \
- "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
- Restart Apache and test
- Django (Nginx-Gunicorn)
- TODO!