Skip to content

Commit 474762e

Browse files
committed
Chore: nginx.conf/ngins.stg.conf 분리
1 parent 4f0dfcd commit 474762e

File tree

3 files changed

+84
-9
lines changed

3 files changed

+84
-9
lines changed

infra/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ services:
7272
container_name: docsa-nginx
7373
restart: unless-stopped
7474
volumes:
75-
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
75+
- ./nginx/nginx.stg.conf:/etc/nginx/nginx.conf:ro
7676
- ./certbot/etc:/etc/letsencrypt:ro
7777
- ./certbot/www:/var/www/certbot:ro
7878
ports:

infra/nginx/nginx.conf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,28 @@ http {
1616
error_log /var/log/nginx/error.log warn;
1717
access_log /var/log/nginx/access.log main;
1818

19-
server {
20-
listen 80;
21-
server_name stg.api.docsa.o-r.kr;
19+
server {
20+
listen 80;
21+
server_name api.docsa.o-r.kr;
2222

2323
location ^~ /.well-known/acme-challenge/ {
2424
root /var/www/certbot;
2525
}
2626

2727
location / {return 301 https://$host$request_uri; }
2828
}
29-
29+
3030
server {
3131
listen 443 ssl http2;
32-
server_name stg.api.docsa.o-r.kr;
32+
server_name api.docsa.o-r.kr;
3333

3434
ssl_certificate /etc/letsencrypt/live/api.docsa.o-r.kr/fullchain.pem;
3535
ssl_certificate_key /etc/letsencrypt/live/api.docsa.o-r.kr/privkey.pem;
3636

3737
ssl_protocols TLSv1.2 TLSv1.3;
3838
ssl_ciphers HIGH:!aNULL:!MD5;
3939
ssl_prefer_server_ciphers on;
40-
40+
4141
ssl_session_cache shared:SSL:10m;
4242
ssl_session_timeout 1d;
4343

@@ -68,8 +68,8 @@ http {
6868
proxy_redirect off;
6969
}
7070

71-
location = /actuator/prometheus { return 404; }
72-
71+
location = /actuator/prometheus { return 404; }
72+
7373
}
7474
}
7575

infra/nginx/nginx.stg.conf

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
user nginx;
2+
worker_processes auto;
3+
pid /var/run/nginx.pid;
4+
5+
events {
6+
worker_connections 1024;
7+
}
8+
9+
http {
10+
include /etc/nginx/mime.types;
11+
default_type application/octet-stream;
12+
13+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
14+
'$status $body_bytes_sent "$http_referer" '
15+
'"$http_user_agent" "$http_x_forwarded_for"';
16+
error_log /var/log/nginx/error.log warn;
17+
access_log /var/log/nginx/access.log main;
18+
19+
server {
20+
listen 80;
21+
server_name stg.api.docsa.o-r.kr;
22+
23+
location ^~ /.well-known/acme-challenge/ {
24+
root /var/www/certbot;
25+
}
26+
27+
location / {return 301 https://$host$request_uri; }
28+
}
29+
30+
; server {
31+
; listen 443 ssl http2;
32+
; server_name stg.api.docsa.o-r.kr;
33+
;
34+
; ssl_certificate /etc/letsencrypt/live/stg.api.docsa.o-r.kr/fullchain.pem;
35+
; ssl_certificate_key /etc/letsencrypt/live/stg.api.docsa.o-r.kr/privkey.pem;
36+
;
37+
; ssl_protocols TLSv1.2 TLSv1.3;
38+
; ssl_ciphers HIGH:!aNULL:!MD5;
39+
; ssl_prefer_server_ciphers on;
40+
;
41+
; ssl_session_cache shared:SSL:10m;
42+
; ssl_session_timeout 1d;
43+
;
44+
; location / {
45+
; proxy_pass http://app:8080;
46+
; proxy_http_version 1.1;
47+
; proxy_set_header Connection "";
48+
; proxy_set_header Host $host;
49+
; proxy_set_header X-Real-IP $remote_addr;
50+
; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
51+
; proxy_set_header X-Forwarded-Proto $scheme;
52+
; }
53+
;
54+
;
55+
; location /grafana/ {
56+
; proxy_pass http://grafana:3000;
57+
;
58+
; proxy_http_version 1.1;
59+
; proxy_set_header Upgrade $http_upgrade;
60+
; proxy_set_header Connection "upgrade";
61+
; proxy_read_timeout 3600;
62+
;
63+
; proxy_set_header Host $host;
64+
; proxy_set_header X-Real-IP $remote_addr;
65+
; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
66+
; proxy_set_header X-Forwarded-Proto $scheme;
67+
; proxy_set_header X-Forwarded-Host $host;
68+
; proxy_redirect off;
69+
; }
70+
;
71+
; location = /actuator/prometheus { return 404; }
72+
;
73+
; }
74+
}
75+

0 commit comments

Comments
 (0)