Skip to content

Commit 1e211b4

Browse files
cwlinodeGuessWhoSamFoo
authored andcommitted
[NEW] NGINX Part 1 - 4 and sort/uniq edits (#1509)
[NEW] NGINX Part 1 - 4 and sort/uniq edits.
1 parent 0364c2b commit 1e211b4

23 files changed

+1225
-2039
lines changed
8.28 KB
Loading
7.85 KB
Loading

docs/development/frameworks/yesod-nginx-mysql-on-debian-7-wheezy.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Before you begin installing and configuring the components described below, plea
4646
apt-get update
4747
apt-get upgrade
4848

49-
4. You also need Nginx and MySQL software. Please refer to [Websites with Nginx on Debian 7 (Wheezy)](/docs/websites/nginx/websites-with-nginx-on-debian-7-wheezy/) and [Using MySQL Relational Databases on Debian 7 (Wheezy)](/docs/databases/mysql/using-mysql-relational-databases-on-debian-7-wheezy/) for their installation guides.
49+
4. You also need Nginx and MySQL software. Please refer to [Websites with Nginx on Debian 7 (Wheezy)](/docs/web-servers/nginx/how-to-install-nginx-on-debian-7-wheezy/) and [How to Install MySQL on Debian 7](/docs/databases/mysql/how-to-install-mysql-on-debian-7/) for their installation guides.
5050

5151
## Install Required Packages
5252

@@ -372,4 +372,3 @@ Link the above file into ``/etc/nginx/sites-enabled``, and restart ``nginx``:
372372
You can check it at *http://www.yoursite.com/* now.
373373

374374
The installation and configuration of Yesod working with Nginx and MySQL are finished.
375-

docs/security/ssl/create-a-self-signed-certificate-on-centos-and-fedora.md

Lines changed: 0 additions & 61 deletions
This file was deleted.

docs/security/ssl/create-a-self-signed-certificate-on-debian-and-ubuntu.md

Lines changed: 0 additions & 57 deletions
This file was deleted.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
author:
3+
name: Linode
4+
5+
description: 'This guide shows how to create a self-signed TLS certificate with OpenSSL.'
6+
keywords: ["ssl", "tls", "https", "certificate", "self"]
7+
license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)'
8+
aliases: ['security/ssl/create-a-self-signed-certificate-on-centos-and-fedora/','security/ssl/create-a-self-signed-certificate-on-debian-and-ubuntu/','security/ssl/how-to-make-a-selfsigned-ssl-certificate/']
9+
modified: 2018-01-23
10+
modified_by:
11+
name: Linode
12+
published: 2018-01-09
13+
title: 'Create a Self-Signed TLS Certificate'
14+
---
15+
16+
![Create a Self-Signed Certificate title graphic](/docs/assets/create-a-self-signed-tls-certificate-title-graphic.jpg "Create a Self-Signed Certificate title graphic")
17+
18+
## What is a Self-Signed TLS Certificate?
19+
20+
Self-signed TLS certificates are suitable for personal use or for applications that are used internally within an organization. If you intend to use your SSL certificate on a website, see our guide on enabling TLS for [NGINX](/docs/web-servers/nginx/enable-tls-on-nginx-for-https-connections/) once you’ve completed the process outlined in this guide.
21+
22+
## Create the Certificate
23+
24+
1. Change to the `root` user and change to the directory in which you want to create the certificate and key pair. That location will vary depending on your needs. Here we'll use `/root/certs`:
25+
26+
su - root
27+
mkdir /root/certs && cd /root/certs
28+
29+
2. Create the certificate:
30+
31+
openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out MyCertificate.crt -keyout MyKey.key
32+
33+
You will be prompted to add identifying information about your website or organization to the certificate. Since a self-signed certificate won't be used publicly, this information isn't necessary. If this certificate will be passed on to a certificate authority for signing, the information needs to be as accurate as possible.
34+
35+
The following is a breakdown of the OpenSSL options used in this command. There are many other options available, but these will create a basic certificate which will be good for a year. For more information, see `man openssl` in your terminal.
36+
37+
* `-newkey rsa:4096`: Create a 4096 bit RSA key for use with the certificate. `RSA 2048` is the default on more recent versions of OpenSSL but to be sure of the key size, you should specify it during creation.
38+
39+
* `-x509`: Create a self-signed certificate.
40+
41+
* `-sha256`: Generate the certificate request using 265-bit SHA (Secure Hash Algorithm).
42+
43+
* `-days`: Determines the length of time in days that the certificate is being issued for. For a self-signed certificate, this value can be increased as necessary.
44+
45+
* `-nodes`: Create a certificate that does not require a passphrase. If this option is excluded, you will be required to enter the passphrase in the console each time the application using it is restarted.
46+
47+
Here is an example of the output:
48+
49+
{{< output >}}
50+
root@localhost:~# openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out MyCertificate.crt -keyout MyKey.key
51+
Generating a 4096 bit RSA private key
52+
..............................................................................+++
53+
..............................................+++
54+
writing new private key to 'MyKey.key'
55+
-----
56+
You are about to be asked to enter information that will be incorporated
57+
into your certificate request.
58+
What you are about to enter is what is called a Distinguished Name or a DN.
59+
There are quite a few fields but you can leave some blank
60+
For some fields there will be a default value,
61+
If you enter '.', the field will be left blank.
62+
-----
63+
Country Name (2 letter code) [AU]:US
64+
State or Province Name (full name) [Some-State]:PA
65+
Locality Name (eg, city) []:Philadelphia
66+
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Linode
67+
Organizational Unit Name (eg, section) []:Docs
68+
Common Name (e.g. server FQDN or YOUR name) []:hostname.example.com
69+
Email Address []:admin@example.com
70+
{{< /output >}}
71+
72+
3. Restrict the key's permissions so that only `root` can access it:
73+
74+
chmod 400 /root/certs/MyKey.key
75+
76+
4. Back up your certificate and key to external storage. **This is an important step. Do not skip it!**

0 commit comments

Comments
 (0)