<< Back Home RU ru   Donate Donate www/www1/www2

Apache + SSL certificate

Self-signed certificate. Simple, but I often forget how to do it :)

 openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout -out

Answer some questions. The main is:

Common Name:

You will get .key and .crt in current directory. Place them to some directory that you defined for sertificate storage. Then update <VirtualHost MY.SITE.IP.ADDRESS:443> section with paths to them:

<VirtualHost MY.SITE.IP.ADDRESS:443>
SSLEngine on
SSLCertificateFile "/usr/local/etc/apache22/ssl/"
SSLCertificateKeyFile "/usr/local/etc/apache22/ssl/"

Note: each SSL-enabled site must have unique IP address.

See also:

Mail to (remove X)  
<< Back designed by Alter aka Alexander A. Telyatnikov powered by Apache+PHP under FBSD © 2002-2017