diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/nginx.html | 15 | ||||
-rw-r--r-- | tools/scripts/install-nginx.sh | 5 |
2 files changed, 14 insertions, 6 deletions
diff --git a/tools/nginx.html b/tools/nginx.html index 5a43a4c..9fd38b9 100644 --- a/tools/nginx.html +++ b/tools/nginx.html @@ -74,7 +74,7 @@ If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:PT - State or Province Name (full name) [Some-State]:Porto + State or Province Name (full name) [Some-State]: Locality Name (eg, city) []: Organization Name (eg, company) [Internet Widgits Pty Ltd]: Organizational Unit Name (eg, section) []: @@ -91,12 +91,15 @@ <p>Sign SSL cetificate;</p> <pre> - $ sudo openssl x509 -req -days 365 -in /etc/ssl/certs/nginx.csr -signkey /etc/ssl/keys/nginx.key -out /etc/ssl/certs/nginx.crt + $ sudo openssl x509 -req -days 365 \ + -in /etc/ssl/certs/nginx.csr \ + -signkey /etc/ssl/keys/nginx.key \ + -out /etc/ssl/certs/nginx.crt + </pre> Signature ok - subject=/C=PT/ST=Porto/O=Internet Widgits Pty Ltd/CN=core.privat-network.net + subject=/C=PT/ST=Some-State/O=Internet Widgits Pty Ltd/CN=core.privat-network.net Getting Private key Enter pass phrase for /etc/ssl/keys/nginx.key: - $ </pre> <p>Having password is a good idea, but requires it every @@ -105,9 +108,11 @@ <pre> $ sudo cp /etc/ssl/keys/nginx.key /etc/ssl/keys/nginx.key.pass $ sudo openssl rsa -in /etc/ssl/keys/nginx.key.pass -out /etc/ssl/keys/nginx.key + </pre> + + <pre> Enter pass phrase for /etc/ssl/keys/nginx.key.org: writing RSA key - $ </pre> <h2 id="nginxconf">3. Nginx Configuration</h2> diff --git a/tools/scripts/install-nginx.sh b/tools/scripts/install-nginx.sh index 5553692..7fee79b 100644 --- a/tools/scripts/install-nginx.sh +++ b/tools/scripts/install-nginx.sh @@ -11,7 +11,10 @@ usermod -m -d /srv/www nginx openssl genrsa -des3 -out /etc/ssl/keys/nginx.key 2048 openssl req -new -key /etc/ssl/keys/nginx.key -out /etc/ssl/certs/nginx.csr -openssl x509 -req -days 365 -in /etc/ssl/certs/nginx.csr -signkey /etc/ssl/keys/nginx.key +openssl x509 -req -days 365 \ + -in /etc/ssl/certs/nginx.csr \ + -signkey /etc/ssl/keys/nginx.key \ + -out /etc/ssl/certs/nginx.crt cp /etc/ssl/keys/nginx.key /etc/ssl/keys/nginx.key.pass openssl rsa -in /etc/ssl/keys/nginx.key.pass -out /etc/ssl/keys/nginx.key |