modified: README.md

modified:   docker-compose.yaml
	new file:   serv_nginx/docker-compose.yml
	renamed:    nginx/Dockerfile -> serv_nginx/nginx/Dockerfile
	renamed:    nginx/nginx-http.conf -> serv_nginx/nginx/nginx-http.conf
	renamed:    nginx/nginx-ssl.conf -> serv_nginx/nginx/nginx-ssl.conf
	renamed:    nginx/switch-config.sh -> serv_nginx/nginx/switch-config.sh
divide nginx service
This commit is contained in:
2025-08-01 05:04:59 +05:00
parent d06236556d
commit f379f2e6c5
7 changed files with 33 additions and 23 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
# Проверяем наличие сертификатов
if [ -f "/etc/letsencrypt/live/yalarba.ru/fullchain.pem" ]; then
echo "SSL certificates found, switching to HTTPS configuration"
ln -sf /etc/nginx/nginx-ssl.conf /etc/nginx/conf.d/default.conf
else
echo "SSL certificates not found, using HTTP only configuration"
ln -sf /etc/nginx/nginx-http.conf /etc/nginx/conf.d/default.conf
fi
# Проверяем конфигурацию nginx
nginx -t