Posts tagged: web server

Generate a self-signed certificate

By , Monday 20th May 2013 9:21 am

Quickly generate a self-signed certificate on the command line. Noting this information as the original source has disappeared and its handy to have around.

mkdir -p /etc/certs
openssl req -new \
            -x509 \
            -days 3650 \
            -nodes \
            -out    "/etc/certs/EXAMPLE.COM.pem" \
            -keyout "/etc/certs/EXAMPLE.COM.key" \
            -batch -subj "/CN=EXAMPLE.COM"

# ensure that the files are readable 
chmod o+r /etc/certs/EXAMPLE.COM.*

Panorama Theme by Themocracy

2 visitors online now
1 guests, 1 bots, 0 members
Max visitors today: 4 at 01:02 am UTC
This month: 11 at 16-04-2017 11:37 pm UTC
This year: 45 at 02-01-2017 10:28 pm UTC
All time: 130 at 28-03-2011 10:40 pm UTC