Skip to content

Commit

Permalink
setup tls cert for nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocicerchia committed Sep 6, 2024
1 parent 566315c commit 5b6a2d6
Show file tree
Hide file tree
Showing 13 changed files with 289 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ Add in `/etc/hosts`
```console
127.0.0.1 poser.local
```
and now you can see the app on [http://poser.local:8001](http://poser.local:8001)
and now you can see the app on [https://poser.local:8002](https://poser.local:8002)
(or if needed to test the HTTP procol use [http://poser.local:8001](http://poser.local:8001)).

### Otherwise, for the other days
```bash
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ status: ## docker containers status
##@ DEV

install: ## install php and node dependencies
- ./sys/nginx/certs/gen-selfsigned-cert.sh poser.local
- docker compose exec phpfpm composer install
- docker compose run --rm node yarn install

Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
- ./sys/nginx/default.conf.template.dev:/etc/nginx/templates/default.conf.template
ports:
- "8001:80"
- "8002:443"
networks:
- application-network

Expand Down Expand Up @@ -70,7 +71,7 @@ services:
net.core.somaxconn: 1024


#Docker Networks
# Docker Networks
networks:
application-network:
driver: bridge
27 changes: 27 additions & 0 deletions sys/nginx/certs/ca-crt.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN CERTIFICATE-----
MIIEozCCAosCFG9PUzdRzVHWRV7NKk9k2hiXRZvbMA0GCSqGSIb3DQEBCwUAMA0x
CzAJBgNVBAMMAmNhMCAXDTI0MDkwNjIwMzYxN1oYDzIwNTIwMTIyMjAzNjE3WjAN
MQswCQYDVQQDDAJjYTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK7y
1KZ6PJLC6BlxQIL9ITe4rOeC9EdEhQLLF1SMJEc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af2AwtlfLg4y8pEdYC0gngbYpzdWgcTbIw0zU+vXs45rl+ysI80sxH/JT1U2h4Qw
ZaisRGrHYOoAVuF+VsYkFg6hVNboJCbUeGkrRxnl/y+s2lZi6fUX79VgoNhxYnwy
rEZtSs+C0HtMJmVbsHixGoA9DenvPlFV00pbmK3BO7G9OxhV5xC6jOvQOGKb4ilV
A2WItGkJ1k9nMwSxfvazZAMyFQiHe1XzdIB7lytUt/h49qpyhXMr8i5aJSnDnc2k
e7+95ayQrAEOAOKV6aJ/PaL6EbuIl3vtDuWk/YzmsE1a3mu+XWsO
-----END CERTIFICATE-----
1 change: 1 addition & 0 deletions sys/nginx/certs/ca-crt.srl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6F6006AE94C028DE19FFF4CC39D212ACE0E02AAC
54 changes: 54 additions & 0 deletions sys/nginx/certs/ca-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIJnDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQI9+L2GR1+hcICAggA
MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECIUc0LUJuK7YBIIJSGoJv3+6IJlZ
5ER6i3n3o29bFxsAgQpSIu/xSHNaYAOrvDwB7KVJjqTCBiQ4mXDdK2WzIDQmAd3N
kjCnJlr+OAgNoAu984wIpcMKOtWF5uIDNpwxPRjB3ZuMcdBDGhs4hO3/2OYcuuoB
aj224sImMdnAr08xtxhMqR0cF0RSA8ZtuGFtzQXMhNCHBVeaUXxO8K9aX1RFL8A1
iQTXHSc8MQkZxH5F+TQtbQ0nEx53I1nFsGRFVqDpHGmV0eiGQ6Ru72ZfNJPMRDdK
aBrfaghF5Yl3uFmZh4OmgxtaOdlzfNPa9WA3/OJrwBO7pSOzNwsasyarseWeuP97
ZgnDHIfW5hFLoWfAZy7MLJnFKOveYBmBnsdBQzbSDa6gppSd9mv3jNF8X2DYOfd5
OJJqYOyl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ygtQrgrlVy1/Zi1fnzGwnc3WdsGWI4hgXrlldecxtrL4L
A6hww1lXzSSuIs78SW5YGq/imdjZQ7SByha7ztgsGw0rEi2cgcHoGfd3+iJO2uwq
bE6IWA89BnsCaW2jWnm3Zr4X6aoJzxlo4RzNZKrNWl57WzpknC4o6GkB4Neqv52b
wL4g7VzWzdiOP16cpEBXh5hFw7c3gxEd7sXlAq16ouepTnUPc4oyoJq8mcAH/Vpb
zlEI9qw3iZrZf7Fi92OXUyNp6Im1MHpm57nSyDfVPELdJQ1utDtS68/bD9+aCj+I
QktBM0nMYbwedlKJO072sEy5ImeYXJUV7AHzwnVLFRJonYGnU0cJEFBLbU+UtPhW
b7Nz17jU5m+OiO4g+LLwlukvHD9bAASPzdaK8XnuZ9srS3X7iJWxH9Ns5rlizhtD
fy99VlOdbPzEhpHzkrwhXbUNb+4Ba53ZazAfECvrModvWPBW3ghQQfXheiHeX8lI
3ASxtvUvsNBs0/owZWgbwGekelR+0D3gyAckDHKjnaOEQXIHeVFH8QzuoQacI6y0
2Co8kEdO58Q9YgpFq9Z5/EHrOj/aQxvlm4TvKnW0TZFWQDttDcJuaMjcYmBAGZHH
iSR0yHSUKaXhDpBhzjxVVw==
-----END ENCRYPTED PRIVATE KEY-----
25 changes: 25 additions & 0 deletions sys/nginx/certs/ca.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[ ca ]
default_ca = CA_default

[ CA_default ]
serial = ca-serial
crl = ca-crl.pem
database = ca-database.txt
name_opt = CA_default
cert_opt = CA_default
default_crl_days = 9999
default_md = md5

[ req ]
default_bits = 4096
days = 9999
distinguished_name = req_distinguished_name
attributes = req_attributes
prompt = no
output_password = password

[ req_distinguished_name ]
CN = ca

[ req_attributes ]
challengePassword = test
38 changes: 38 additions & 0 deletions sys/nginx/certs/gen-selfsigned-cert.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)

DOMAIN=$1
if [ "$DOMAIN" == "" ]; then
DOMAIN="default"
fi

# CA
openssl req \
-new \
-x509 \
-days 9999 \
-config "$SCRIPT_DIR/ca.cnf" \
-keyout "$SCRIPT_DIR/ca-key.pem" \
-out "$SCRIPT_DIR/ca-crt.pem"

openssl genrsa -out "$SCRIPT_DIR/server.key" 4096

# CSR
openssl req \
-new \
-config "$SCRIPT_DIR/server.cnf" \
-key "$SCRIPT_DIR/server.key" \
-out "$SCRIPT_DIR/server.csr"

# CERT
openssl x509 \
-req \
-extfile "$SCRIPT_DIR/server.cnf" \
-days 3650 \
-passin "pass:password" \
-in "$SCRIPT_DIR/server.csr" \
-CA "$SCRIPT_DIR/ca-crt.pem" \
-CAkey "$SCRIPT_DIR/ca-key.pem" \
-CAcreateserial \
-out "$SCRIPT_DIR/server.pem"
24 changes: 24 additions & 0 deletions sys/nginx/certs/server.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[ req ]
default_bits = 4096
days = 9999
distinguished_name = req_distinguished_name
attributes = req_attributes
prompt = no
x509_extensions = v3_ca

[ req_distinguished_name ]
CN = poser.local

[ v3_req ]

subjectAltName = DNS:poser.local

[ req_attributes ]
challengePassword = password

[ v3_ca ]
authorityInfoAccess = @issuer_info

[ issuer_info ]
OCSP;URI.0 = http://ocsp.example.com/
caIssuers;URI.0 = http://example.com/ca.cert
26 changes: 26 additions & 0 deletions sys/nginx/certs/server.csr
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
-----BEGIN CERTIFICATE REQUEST-----
MIIEdDCCAlwCAQAwFjEUMBIGA1UEAwwLcG9zZXIubG9jYWwwggIiMA0GCSqGSIb3
DQEBAQUAA4ICDwAwggIKAoICAQC1q4aR1lg0d1E0VRedWhuYMvkIS53jcn7D63Hv
AAvUak0G7EDeWq+EShZ2ZabiDQafF2NFBu+2K7u5FKj/JNUsxkG1+7W0zI90Oiy6
dprFBylHzpDrqrWIhaEiNjZ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C2r0TA86SAdhUX25O0ODBzwRVN+nnyJVSmCbr/pzqlYgjPoHViVfZCUEchCnqHN
oX/if+CpEXdl4PJ4kNz/2t5KuP4XH7b4iH8zHxnWIjNxgeXN1+8ef7fkEIU9O0U+
uEnYPEaWbe9j/Bhs/6yPr+ZwUmojPqo2e2hbaxaEhGMDIBkge7HakPQ3QFOTSYKS
yOkojXH2FxdaHiT+g1n5SiyULFcC0y//zMypnfxFNlkqrVMJ/PuqkA==
-----END CERTIFICATE REQUEST-----
52 changes: 52 additions & 0 deletions sys/nginx/certs/server.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
-----BEGIN PRIVATE KEY-----
MIIJQwIBADANBgkqhkiG9w0BAQEFAASCCS0wggkpAgEAAoICAQC1q4aR1lg0d1E0
VRedWhuYMvkIS53jcn7D63HvAAvUak0G7EDeWq+EShZ2ZabiDQafF2NFBu+2K7u5
FKj/JNUsxkG1+7W0zI90Oiy6dprFBylHzpDrqrWIhaEiNjZhgz4EIjKitYc4uaxM
IyAwyKwuLLM40dBg41IY5HPhfUXX6T2i5Pg+dAk6PtkWn7ewolDGx2iBCOikqe1l
rfJrJxNT5HUztx3LR2YSHTdRFDkKMZhmXXV+K0ozdEt0a2DHv97ZswPBywtUINq6
EkLmBZNmIlQ4f5Hp/BoIIlt9yLP2laycGF/yEmUHOkqChSn0dDPBhEGYqn2K9OqX
o39qyfq9vhE7cYLaKlx/2NI7e/rMaaJ/RQ3o3XkHz34S2RChvGg0uGjNfgOvqQcr
1QTSsnPGmpwEw4v2ugdickN15Iyz0G156H5JOxkDgZmtP8efI5O/rpTOYVEsI7E9
B5IVK5y00ubBN8kVrmVYdNMMxRHWeCDQAEbzygfhQfQ8uEkVdIVRqvROyT0sAwQ0
0m9D848fhtRe8dFR5wohq0vUtT92u+g9wqIbScoyQ4dzh1YfmRbj5babiF/OgUkh
wEh9GVYHY3l2/w27H1tflPV8IO9jNZtY/MGLWq4W/x3We8qn9RVLwrNniEFkoniN
Uc387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yHDmuvmYozCVQ1B9UmwJcM+79gqI/ob1IXhulBO8Ae989Fc1
Q/UGieoORTLXMtQML+0GUvhHyahAvqqbvs0boGskzg/cPRbclJ5JcFuKf5iHF5Ul
+3tz4j9BpiQpmiTQVOxREZ7O2qGoCOG5TPGHXJz9vsDix4tmggk11kWkPnpBs8In
mBDiDlnqiNEM8sF07TnqKJKPio/iDRBPIP157RLdU25/6hNhrs4aeJadSuYhbJTg
MaEcSRoA7VjO6Xs7Z4CimqPmkXAUH19sKVYEb7sgPlpug6RKrvX5gquEdTq6YkzQ
92JMzmh/jEwLtkQ4n1q2tf+DhgBOaMI=
-----END PRIVATE KEY-----
27 changes: 27 additions & 0 deletions sys/nginx/certs/server.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN CERTIFICATE-----
MIIEqjCCApICFG9gBq6UwCjeGf/0zDnSEqzg4CqsMA0GCSqGSIb3DQEBCwUAMA0x
CzAJBgNVBAMMAmNhMB4XDTI0MDkwNjIwMzYxOFoXDTM0MDkwNDIwMzYxOFowFjEU
MBIGA1UEAwwLcG9zZXIubG9jYWwwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK
AoICAQC1q4aR1lg0d1E0VRedWhuYMvkIS53jcn7D63HvAAvUak0G7EDeWq+EShZ2
ZabiDQafF2NFBu+2K7u5FKj/JNUsxkG1+7W0zI90Oiy6dprFBylHzpDrqrWIhaEi
NjZhgz4EIjKitYc4uaxMIyAwyKwuLLM40dBg41IY5HPhfUXX6T2i5Pg+dAk6PtkW
n7ewolDGx2iBCOikqe1lrfJrJxNT5HUztx3LR2YSHTdRFDkKMZhmXXV+K0ozdEt0
a2DHv97ZswPBywtUINq6EkLmBZNmIlQ4f5Hp/BoIIlt9yLP2laycGF/yEmUHOkqC
hSn0dDPBhEGYqn2K9OqXo39qyfq9vhE7cYLaKlx/2NI7e/rMaaJ/RQ3o3XkHz34S
2RChvGg0uGjNfgOvqQcr1QTSsnPGmpwEw4v2ugdickN15Iyz0G156H5JOxkDgZmt
P8efI5O/rpTOYVEsI7E9B5IVK5y00ubBN8kVrmVYdNMMxRHWeCDQAEbzygfhQfQ8
uEkVdIVRqvROyT0sAwQ00m9D848fhtRe8dFR5wohq0vUtT92u+g9wqIbScoyQ4dz
h1YfmRbj5babiF/OgUkhwEh9GVYHY3l2/w27H1tflPV8IO9jNZtY/MGLWq4W/x3W
e8qn9RVLwrNniEFkoniNUc387VPE0HWNd5Ikk8PoK1PfqF/oXQIDAQABMA0GCSqG
SIb3DQEBCwUAA4ICAQAGkuu4qPAfeBqcl2ODa+riq2JQy+UxtTm5eEuZ+YzfSPaQ
SEbNKvPHOJKH54R0qjrSTTZ+Eks+9v2MOC8QDgOdpqztwBSkQjo1hl8PS5xHWc2+
ZXya/tsj6NiDipGkoiVfK5/aOLOa/l8SHQ9fW/ijBa45jlrte17ER7Kh1ui7e7A8
lLVJZZZ4I+gfrvXYd6UPyHHa+Y4gd1Nt7Q47HsGmB3hQ+G/NzNK7AJL/e8k9Of8K
T5lGuvGaK2GLi8NkjMlWNzxv9taa4ZDDb1/iZbKWbtRca2vlCGHlXQRDgkdfxOxd
0iTcNjXignmOLMpRipj1QFjFXsNYVXIyHmkfUsJCqn/QV5Us9RcURZqx/P9UlM3F
iLq71mjMuc2myyHE4T3lezDJ7k8gvtCmDk9OPch6rpylpw6tmx2UspPJBYfPPCds
LQc2nd63HwmQaactWXVvOKIZoRzFQ9sQsj0KhczlWGG+Yyb7XQQ4RzB9jdXicsVv
ijPtvU9s6+PNdmYTW8PGl075pBtx3tjiH/suqOTX2mg0QQgl+IQsl1xNQq7H4kiZ
B0a0rAw/Z7X7kOFKfseLUWKC7ZTgjI4ZWHk6vUcac5ZjkAhtnpCQWn8veO8+Irqi
RMIfH85xte5DawN+R5Ktp/Vu69DPu5PJ5FA6xRFVMojGOwYRkBYli2xGS63HSw==
-----END CERTIFICATE-----
10 changes: 10 additions & 0 deletions sys/nginx/default.conf.template.dev
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ server {
listen 80;
server_name poser.pugx.org poser.packagist.org poser.local stg.poser.pugx.org;

return https://$server_name;
}

server {
listen 443 ssl;
server_name poser.pugx.org poser.packagist.org poser.local stg.poser.pugx.org;

ssl_certificate /application/sys/nginx/certs/server.pem;
ssl_certificate_key /application/sys/nginx/certs/server.key;

root /application/public;

fastcgi_cache cached_badges;
Expand Down

0 comments on commit 5b6a2d6

Please sign in to comment.