Skip to content

Commit ba15a2f

Browse files
authored
Merge pull request #34 from codeguru42/21-nginx-config
21 nginx config
2 parents 2e67c1a + 93e6ffe commit ba15a2f

File tree

3 files changed

+46
-7
lines changed

3 files changed

+46
-7
lines changed

http-client.env.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
{
22
"local": {
3+
"protocol": "http://",
34
"host": "localhost",
45
"port": "8000"
56
},
6-
"private": {
7+
"local-ip": {
8+
"protocol": "http://",
79
"host": "192.168.1.2",
810
"port": "8000"
911
},
10-
"private-server": {
12+
"server-private-ip": {
13+
"protocol": "http://",
1114
"host": "192.168.1.9",
1215
"port": "8000"
1316
},
14-
"public-server": {
15-
"host": "",
16-
"port": "8000"
17+
"server-public-ip": {
18+
"protocol": "http://",
19+
"host": "38.70.247.27",
20+
"port": ""
21+
},
22+
"server-domain": {
23+
"protocol": "https://",
24+
"host": "go-capture-api.code-apprentice.com",
25+
"port": ""
1726
}
1827
}

nginx.conf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
upstream go_capture {
2+
server 127.0.0.1:8000;
3+
}
4+
5+
server {
6+
listen 80;
7+
server_name go-capture-api.code-apprentice.com;
8+
return 301 https://$server_name$request_uri;
9+
}
10+
11+
server {
12+
listen 443 ssl http2;
13+
14+
server_name go-capture-api.code-apprentice.com;
15+
client_max_body_size 0;
16+
17+
ssl_certificate /etc/letsencrypt/live/code-apprentice.com-0001/fullchain.pem;
18+
ssl_certificate_key /etc/letsencrypt/live/code-apprentice.com-0001/privkey.pem;
19+
ssl_session_cache shared:SSL:10m;
20+
ssl_protocols TLSv1.2 TLSv1.3;
21+
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
22+
ssl_prefer_server_ciphers on;
23+
24+
location / {
25+
proxy_pass http://go_capture;
26+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
27+
proxy_set_header Host $host;
28+
proxy_redirect off;
29+
}
30+
}

requests.http

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
### health check
2-
GET http://{{host}}:{{port}}/health_check/
2+
GET {{protocol}}{{host}}:{{port}}/health_check/
33

44
### POST image
5-
POST http://{{host}}:{{port}}/capture/
5+
POST {{protocol}}{{host}}:{{port}}/capture/
66
Content-Type: multipart/form-data; boundary=WebAppBoundary
77

88
--WebAppBoundary

0 commit comments

Comments
 (0)