init: initial commit
This commit is contained in:
commit
dbcde8c5be
3
Dockerfile
Normal file
3
Dockerfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
FROM nginx:1.19
|
||||||
|
WORKDIR /nginx
|
||||||
|
COPY ./nginx/conf.d /etc/nginx/conf.d
|
20
docker-compose.yml
Normal file
20
docker-compose.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
name: traefik
|
||||||
|
external: true
|
||||||
|
|
||||||
|
services:
|
||||||
|
nginx:
|
||||||
|
build: .
|
||||||
|
container_name: hfbz-nginx
|
||||||
|
restart: always
|
||||||
|
labels:
|
||||||
|
- traefik.enable=true
|
||||||
|
- traefik.http.routers.hfbz-nginx.rule=Host(`xn--fiqa592br0dm3gfp6c.com`, `www.xn--fiqa592br0dm3gfp6c.com`)
|
||||||
|
- traefik.http.routers.hfbz-nginx.entrypoints=web,websecure
|
||||||
|
- traefik.http.routers.hfbz-nginx.tls.certresolver=letsencrypt
|
||||||
|
- traefik.http.routers.hfbz-nginx.middlewares=CORS@file
|
||||||
|
networks:
|
||||||
|
- traefik
|
6
nginx/conf.d/default.conf
Normal file
6
nginx/conf.d/default.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
|
||||||
|
return 403;
|
||||||
|
}
|
9
nginx/conf.d/root.conf
Normal file
9
nginx/conf.d/root.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
server_name xn--fiqa592br0dm3gfp6c.com;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
rewrite ^/(.*) https://www.hfbz.com/ permanent;
|
||||||
|
}
|
||||||
|
}
|
9
nginx/conf.d/www.conf
Normal file
9
nginx/conf.d/www.conf
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
server_name www.xn--fiqa592br0dm3gfp6c.com
|
||||||
|
|
||||||
|
location / {
|
||||||
|
rewrite ^/(.*) https://www.hfbz.com/ permanent;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user