procedures:internal_ca
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| procedures:internal_ca [2023/02/10 09:04] – gizmo | procedures:internal_ca [2023/02/10 13:45] (Version actuelle) – gizmo | ||
|---|---|---|---|
| Ligne 47: | Ligne 47: | ||
| echo "Valid fqdn, generate certificate for ${FQDN}" | echo "Valid fqdn, generate certificate for ${FQDN}" | ||
| openssl genrsa -out ${DEST_CERT}/ | openssl genrsa -out ${DEST_CERT}/ | ||
| + | chmod 0644 ${DEST_CERT}/ | ||
| openssl req -new -key " | openssl req -new -key " | ||
| -sha512 \ | -sha512 \ | ||
| Ligne 67: | Ligne 68: | ||
| ``` | ``` | ||
| server { | server { | ||
| - | | + | |
| - | | + | |
| - | | + | |
| - | error_log / | + | error_log / |
| - | + | ||
| - | location / { | + | |
| - | try_files $uri @redirect; | + | |
| - | } | + | |
| + | location / { | ||
| + | try_files $uri @redirect; | ||
| + | } | ||
| - | | + | |
| - | return 301 https:// | + | return 301 https:// |
| - | } | + | } |
| } | } | ||
| server { | server { | ||
| - | | + | |
| - | listen [::]:443 ssl http2; | + | listen [::]:443 ssl http2; |
| - | server_name | + | server_name |
| - | | + | |
| - | rewrite | + | rewrite |
| - | } | + | } |
| - | + | ||
| - | index index.html index.htm index.php; | + | |
| - | access_log | + | |
| - | error_log | + | |
| - | include | + | index index.html index.htm index.php; |
| + | access_log | ||
| + | error_log | ||
| - | ssl_certificate | + | include |
| - | ssl_certificate_key / | + | |
| + | ssl_certificate / | ||
| + | ssl_certificate_key / | ||
| - | | + | |
| root / | root / | ||
| + | autoindex on; | ||
| - | autoindex on; | + | location ~\.key { |
| - | | + | allow 172.17.0.63; # web01.grif |
| + | deny all; | ||
| + | } | ||
| - | | + | |
| - | deny all; | + | deny all; |
| - | | + | } |
| } | } | ||
| - | location ~\.(key)$ { | ||
| - | allow 172.17.0.63; | ||
| - | deny all; | ||
| - | return 403; | ||
| - | } | ||
| - | } | ||
| } | } | ||
| + | |||
| ``` | ``` | ||
procedures/internal_ca.1676019877.txt.gz · Dernière modification : de gizmo
