Difference between revisions of "SSL Certificate"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) |
Rafahsolis (talk | contribs) |
||
| Line 24: | Line 24: | ||
##:: CustomLog logs/ssl_request_log \ | ##:: CustomLog logs/ssl_request_log \ | ||
##:: "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"</pre> | ##:: "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"</pre> | ||
| + | ## Secure SSL | ||
| + | ##:<pre> | ||
| + | ##:: sudo nano /etc/apache2/mods-enable/ssl.conf | ||
| + | ##:: SSLCipherSuite HIGH:!aNULL:!MD5:!3DES | ||
| + | ##:: SSLHonorCipherOrder on | ||
| + | ##:: SSLProtocol TLSv1.2 | ||
| + | ##:: SSLCompression off</pre> | ||
## Restart Apache and test | ## Restart Apache and test | ||
#* Django (Nginx-Gunicorn) | #* Django (Nginx-Gunicorn) | ||
## TODO! | ## TODO! | ||
Revision as of 17:12, 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----- 1 root ssl-cert 891 Jun 29 13:22 server.key
cp server.key server.key.org && openssl rsa -in server.key.org -out server.key
-rw-r--r-- 1 root ssl-cert 891 Jun 29 13:22 server.crt
- 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 640 to .key and 644 to .crt
- cp server.crt /usr/local/apache/conf/ssl.crt # ALTERNATIVE: /etc/ssl/certs
- cp server.key /usr/local/apache/conf/ssl.key #ALTERNATIVE: /etc/ssl/private
- 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"
- Secure SSL
- sudo nano /etc/apache2/mods-enable/ssl.conf
- SSLCipherSuite HIGH:!aNULL:!MD5:!3DES
- SSLHonorCipherOrder on
- SSLProtocol TLSv1.2
- SSLCompression off
- Restart Apache and test
- Django (Nginx-Gunicorn)
- TODO!