Update Section_07/ssl.sh, Section_07/000-default-ssl.conf, Section_07/reverse_proxy_ssl.conf, Section_07/default_ssl, Section_07/reverse_proxy_ssl

This commit is contained in:
Kishan Takoordyal
2023-05-20 20:49:30 +00:00
parent 6f9c78119d
commit 00c29b07c0
5 changed files with 72 additions and 2 deletions

37
Section_07/default_ssl Normal file
View File

@@ -0,0 +1,37 @@
server {
listen 80;
listen [::]:80;
server_name demo-devops.konnect.dev;
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
server_name demo-devops.konnect.dev;
root /var/www/html;
index index.php index.nginx-debian.html;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
}
location ~ /\.ht {
deny all;
}
access_log /var/log/nginx/default_nginx.log;
error_log /var/log/nginx/default_nginx.log;
ssl_certificate /etc/letsencrypt/live/demo-devops.konnect.dev/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/demo-devops.konnect.dev/privkey.pem;
}