mirror of
https://github.com/ditatompel/insights.git
synced 2025-01-08 03:12:06 +07:00
Rename ssl
dir to certs
This commit is contained in:
parent
3f36f5a14a
commit
5c40b9fdd5
2 changed files with 10 additions and 10 deletions
|
@ -121,25 +121,25 @@ http {
|
|||
|
||||
## Mempersiapkan struktur direktori Nginx
|
||||
|
||||
Buat direktori `sites-available`, `sites-enabled`, `ssl`, `snippets` di dalam direktori `/etc/nginx` dengan menjalankan perintah:
|
||||
Buat direktori `sites-available`, `sites-enabled`, `certs`, `snippets` di dalam direktori `/etc/nginx` dengan menjalankan perintah:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /etc/nginx/{sites-available,sites-enabled,ssl,snippets}
|
||||
sudo mkdir -p /etc/nginx/{sites-available,sites-enabled,certs,snippets}
|
||||
```
|
||||
|
||||
Buat _self-signed certificate_ (hanya digunakan sebagai konfigurasi awal yang nantinya digantikan oleh `certbot`):
|
||||
|
||||
```shell
|
||||
sudo openssl req -x509 -newkey rsa:4096 -days 365 -nodes \
|
||||
-keyout /etc/nginx/ssl/privkey.pem \
|
||||
-out /etc/nginx/ssl/fullchain.pem \
|
||||
-keyout /etc/nginx/certs/privkey.pem \
|
||||
-out /etc/nginx/certs/fullchain.pem \
|
||||
-subj '/CN=example.local/O=My Organization/C=US'
|
||||
```
|
||||
|
||||
Buat _DH-param_ dengan menjalankan perintah:
|
||||
|
||||
```shell
|
||||
sudo openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
|
||||
sudo openssl dhparam -out /etc/nginx/certs/dhparam.pem 2048
|
||||
```
|
||||
|
||||
## Cloudflare IP Trusted Proxy
|
||||
|
|
|
@ -121,25 +121,25 @@ http {
|
|||
|
||||
## Preparing the Nginx directory structure
|
||||
|
||||
Create the `sites-available`, `sites-enabled`, `ssl`, `snippets` directories inside the `/etc/nginx` directory:
|
||||
Create the `sites-available`, `sites-enabled`, `certs`, `snippets` directories inside the `/etc/nginx` directory:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /etc/nginx/{sites-available,sites-enabled,ssl,snippets}
|
||||
sudo mkdir -p /etc/nginx/{sites-available,sites-enabled,certs,snippets}
|
||||
```
|
||||
|
||||
Create a _self-signed_ certificate (only used as an initial configuration which will later be replaced by `certbot`):
|
||||
|
||||
```shell
|
||||
sudo openssl req -x509 -newkey rsa:4096 -days 365 -nodes \
|
||||
-keyout /etc/nginx/ssl/privkey.pem \
|
||||
-out /etc/nginx/ssl/fullchain.pem \
|
||||
-keyout /etc/nginx/certs/privkey.pem \
|
||||
-out /etc/nginx/certs/fullchain.pem \
|
||||
-subj '/CN=example.local/O=My Organization/C=US'
|
||||
```
|
||||
|
||||
Create _DH-param_ by running:
|
||||
|
||||
```shell
|
||||
sudo openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
|
||||
sudo openssl dhparam -out /etc/nginx/certs/dhparam.pem 2048
|
||||
```
|
||||
|
||||
## Cloudflare's IPs trusted proxy
|
||||
|
|
Loading…
Reference in a new issue