-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnginx.conf
More file actions
141 lines (141 loc) · 7.04 KB
/
nginx.conf
File metadata and controls
141 lines (141 loc) · 7.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# # # # Https를 위한 설정
# # # # server {
# # # # listen 80;
# # # # server_name 3everide.com www.3everide.com;
# # # #
# # # # location / {
# # # # return 301 https://$host$request_uri;
# # # # }
# # # # }
# # # #
# # # # server {
# # # # listen 443 ssl;
# # # # server_name 3everide.com www.3everide.com;
# # # #
# # # # ssl_certificate /etc/letsencrypt/live/3everide.com/fullchain.pem;
# # # # ssl_certificate_key /etc/letsencrypt/live/3everide.com/privkey.pem;
# # # #
# # # # location / {
# # # # proxy_pass http://localhost:8080;
# # # # 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;
# # # #
# # # # # CORS 설정 추가
# # # # if ($request_method = 'OPTIONS') {
# # # # add_header 'Access-Control-Allow-Origin' 'https://3ever.vercel.app';
# # # # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
# # # # add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization';
# # # # add_header 'Access-Control-Max-Age' 1728000;
# # # # add_header 'Content-Type' 'text/plain charset=UTF-8';
# # # # add_header 'Content-Length' 0;
# # # # return 204;
# # # # }
# # # #
# # # # add_header 'Access-Control-Allow-Origin' 'https://3ever.vercel.app';
# # # # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
# # # # add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization';
# # # # }
# # # # }
# # #
# # # # # Http를 위한 설정
# # # # server {
# # # # listen 80;
# # # # server_name ec2-3-34-144-78.ap-northeast-2.compute.amazonaws.com;
# # # #
# # # # location /api/ {
# # # # proxy_pass http://127.0.0.1:8080;
# # # # 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;
# # # #
# # # # # CORS 설정 추가
# # # # if ($request_method = 'OPTIONS') {
# # # # add_header 'Access-Control-Allow-Origin' 'https://3ever.vercel.app';
# # # # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
# # # # add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization, X-AUTH-TOKEN, Authorization_Refresh, Access-Control-Allow-Origin, Access-Control-Allow-Credentials';
# # # # add_header 'Access-Control-Allow-Credentials' 'true';
# # # # add_header 'Access-Control-Expose-Headers' 'Content-Type, X-AUTH-TOKEN, Authorization, Authorization_Refresh, Access-Control-Allow-Origin, Access-Control-Allow-Credentials';
# # # # add_header 'Access-Control-Max-Age' 1728000;
# # # # add_header 'Content-Type' 'text/plain; charset=UTF-8';
# # # # add_header 'Content-Length' 0;
# # # # return 204;
# # # # }
# # # #
# # # # add_header 'Access-Control-Allow-Origin' 'https://3ever.vercel.app';
# # # # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
# # # # add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization, X-AUTH-TOKEN, Authorization_Refresh, Access-Control-Allow-Origin, Access-Control-Allow-Credentials';
# # # # add_header 'Access-Control-Allow-Credentials' 'true';
# # # # add_header 'Access-Control-Expose-Headers' 'Content-Type, X-AUTH-TOKEN, Authorization, Authorization_Refresh, Access-Control-Allow-Origin, Access-Control-Allow-Credentials';
# # # # }
# # # # }
# # #
# server {
# listen 80;
# server_name ec2-3-36-91-216.ap-northeast-2.compute.amazonaws.com;
#
# location / {
#
# proxy_buffer_size 128k;
# proxy_buffers 4 256k;
# proxy_busy_buffers_size 256k;
#
# proxy_connect_timeout 300; #기본 60s
# proxy_send_timeout 300; #기본 60s
# proxy_read_timeout 300; #기본 60s
# send_timeout 300; #기본 60s
#
# proxy_pass http://ec2-3-36-91-216.ap-northeast-2.compute.amazonaws.com:8080;
# 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;
#
# # 실제 요청에 대한 CORS 헤더 설정
# add_header 'Access-Control-Allow-Origin' 'https://3ever.vercel.app' always;
# add_header 'Access-Control-Allow-Methods' '*' always;
# add_header 'Access-Control-Allow-Headers' '*' always;
# add_header 'Access-Control-Allow-Credentials' 'true' always;
# add_header 'Access-Control-Expose-Headers' 'Content-Type, X-AUTH-TOKEN, Authorization, Authorization_Refresh' always;
#
# # CORS 설정
# if ($request_method = 'OPTIONS') {
# add_header 'Access-Control-Allow-Origin' 'https://3ever.vercel.app';
# add_header 'Access-Control-Allow-Methods' '*';
# add_header 'Access-Control-Allow-Headers' '*';
# add_header 'Access-Control-Allow-Credentials' 'true';
# add_header 'Access-Control-Expose-Headers' 'Content-Type, X-AUTH-TOKEN, Authorization, Authorization_Refresh' always;
# add_header 'Access-Control-Max-Age' 1728000;
# add_header 'Content-Type' 'text/plain; charset=UTF-8';
# add_header 'Content-Length' '0';
# return 204;
# }
#
# error_log /var/log/nginx/error.log;
# access_log /var/log/nginx/access.log;
#
#
# # # 실제 요청에 대한 CORS 헤더 설정
# # add_header 'Access-Control-Allow-Origin' 'https://3ever.vercel.app' always;
# # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT' always;
# # add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization, X-AUTH-TOKEN, Authorization_Refresh' always;
# # add_header 'Access-Control-Allow-Credentials' 'true' always;
# # add_header 'Access-Control-Expose-Headers' 'Content-Type, X-AUTH-TOKEN, Authorization, Authorization_Refresh' always;
# #
# # # CORS 설정
# # if ($request_method = 'OPTIONS') {
# # add_header 'Access-Control-Allow-Origin' 'https://3ever.vercel.app';
# # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, DELETE, PUT';
# # add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization, X-AUTH-TOKEN, Authorization_Refresh';
# # add_header 'Access-Control-Allow-Credentials' 'true';
# # add_header 'Access-Control-Max-Age' 1728000;
# # add_header 'Content-Type' 'text/plain; charset=UTF-8';
# # add_header 'Content-Length' '0';
# # return 204;
# # }
# }
# }
#
#