Compare commits
9 Commits
aa14a85127
...
4fb9aecbb4
Author | SHA1 | Date | |
---|---|---|---|
4fb9aecbb4 | |||
![]() |
52d3dbb609 | ||
![]() |
dd75d1a1fc | ||
![]() |
16f98386ac | ||
![]() |
9757c410e3 | ||
![]() |
7adf8f3daf | ||
![]() |
bf323d406e | ||
![]() |
b2e892a6a6 | ||
![]() |
6c89025327 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
certs/
|
@ -5,6 +5,22 @@ services:
|
|||||||
container_name: nginx-reverse-proxy
|
container_name: nginx-reverse-proxy
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
|
- "443:443"
|
||||||
volumes:
|
volumes:
|
||||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||||
|
- ./certs:/etc/letsencrypt
|
||||||
|
- ./html:/var/www/html
|
||||||
|
- ./logs/nginx:/var/log/nginx
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
|
certbot:
|
||||||
|
image: certbot/certbot
|
||||||
|
container_name: certbot
|
||||||
|
volumes:
|
||||||
|
- ./certs:/etc/letsencrypt
|
||||||
|
- ./html:/var/www/html
|
||||||
|
# command: certonly --webroot --webroot-path=/var/www/html --email prbigoon@gmail.com --agree-tos --no-eff-email -d git.evil-bird.ru
|
||||||
|
command: renew --webroot --webroot-path=/var/www/html
|
||||||
|
entrypoint: /bin/sh -c "trap exit TERM; while :; do certbot renew --webroot --webroot-path=/var/www/html; sleep 12h & wait $${!}; done;"
|
||||||
|
depends_on:
|
||||||
|
- nginx
|
||||||
|
1
html/index.html
Normal file
1
html/index.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<html><body><h1>Test Page</h1></body></html>
|
30
html/stagged_nginx.conf
Normal file
30
html/stagged_nginx.conf
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
events {}
|
||||||
|
|
||||||
|
http {
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name git.evil-bird.ru;
|
||||||
|
|
||||||
|
location /.well-known/acme-challenge/ {
|
||||||
|
root /var/www/html;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /var/www/html;
|
||||||
|
index index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443; # ssl;
|
||||||
|
server_name git.evil-bird.ru;
|
||||||
|
|
||||||
|
# ssl_certificate /etc/letsencrypt/live/git.evil-bird.ru/fullchain.pem;
|
||||||
|
# ssl_certificate_key /etc/letsencrypt/live/git.evil-bird.ru/privkey.pem;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /var/www/html;
|
||||||
|
index index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
nginx.conf
19
nginx.conf
@ -1,10 +1,29 @@
|
|||||||
events {}
|
events {}
|
||||||
|
|
||||||
http {
|
http {
|
||||||
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name git.evil-bird.ru;
|
server_name git.evil-bird.ru;
|
||||||
|
|
||||||
|
location /.well-known/acme-challenge/ {
|
||||||
|
root /var/www/html;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name git.evil-bird.ru;
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/git.evil-bird.ru/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/git.evil-bird.ru/privkey.pem;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://10.10.1.10:3000;
|
proxy_pass http://10.10.1.10:3000;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user