Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

Commit febfaa8

Browse files
author
Ricardo Malta
committed
New
Nginx configuration
1 parent c2d398c commit febfaa8

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Diff for: config/nginx/site.conf

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
upstream service {
2+
server 127.0.0.1:9700;
3+
}
4+
5+
server {
6+
listen 443 ssl default_server;
7+
server_name api.earfy.net;
8+
9+
# ssl_certificate /etc/letsencrypt/live/MY_HOST_DOMAIN/fullchain.pem;
10+
# ssl_certificate_key /etc/letsencrypt/live/MY_HOST_DOMAIN/privkey.pem;
11+
12+
location / {
13+
14+
auth_basic "Restricted Content";
15+
auth_basic_user_file /etc/nginx/.htpasswd;
16+
17+
proxy_set_header X-Real-IP $remote_addr;
18+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
19+
proxy_set_header Host $host;
20+
proxy_set_header X-NginX-Proxy true;
21+
22+
proxy_pass http://service;
23+
proxy_redirect off;
24+
}
25+
26+
location /socket.io {
27+
proxy_set_header Upgrade $http_upgrade;
28+
proxy_set_header Connection "upgrade";
29+
proxy_http_version 1.1;
30+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
31+
proxy_set_header Host $host;
32+
proxy_pass http://service;
33+
}
34+
}

0 commit comments

Comments
 (0)