I'm testing

This commit is contained in:
vanten-s 2023-08-20 12:58:42 +02:00
parent 698a46c9f9
commit 581f65dbe5
Signed by: vanten-s
GPG key ID: DE3060396884D3F2
4 changed files with 80 additions and 68 deletions

View file

@ -1,5 +0,0 @@
FROM nginx:latest
# Copy config
COPY nginx.conf /etc/nginx/nginx.conf

View file

@ -1,5 +1,15 @@
services: services:
nginx: nginx:
build: . image: nginx:latest
network_mode: "host" network_mode: "host"
volumes:
- ./nginx/conf/:/etc/nginx/conf.d/:ro
- ./certbot/www:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
certbot:
image: certbot/certbot:latest
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw

View file

@ -1,62 +0,0 @@
events {}
http {
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
server_name nextcloud.vanten-s.com;
location / {
proxy_pass http://127.0.0.1:11000$request_uri;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Accept-Encoding "";
proxy_set_header Host $host;
client_body_buffer_size 512k;
proxy_read_timeout 86400s;
client_max_body_size 0;
}
listen 80;
}
server {
server_name vnc.vanten-s.com;
location / {
proxy_pass http://localhost:8089;
}
listen 80;
}
server {
server_name forgejo.vanten-s.com;
client_max_body_size 0;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://172.21.0.3:3000/;
}
listen 80;
}
server {
server_name vanten-s.com www.vanten-s.com;
location / {
proxy_pass http://172.20.0.2:3000/;
}
listen 80;
}
}

69
nginx/conf/nginx.conf Normal file
View file

@ -0,0 +1,69 @@
events {}
http {
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
server_name nextcloud.vanten-s.com;
location / {
proxy_pass http://127.0.0.1:11000$request_uri;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Accept-Encoding "";
proxy_set_header Host $host;
client_body_buffer_size 512k;
proxy_read_timeout 86400s;
client_max_body_size 0;
}
listen 80;
}
server {
server_name vnc.vanten-s.com;
location / {
proxy_pass http://localhost:8089;
}
listen 80;
}
server {
server_name forgejo.vanten-s.com;
client_max_body_size 0;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://172.21.0.3:3000/;
}
listen 80;
}
server {
server_name vanten-s.com www.vanten-s.com;
server_tokens off;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
proxy_pass http://172.20.0.2:3000/;
}
listen 80;
}
}