Skip to content

Commit 7f45d63

Browse files
committed
add openvscode-server proxy conf
1 parent f3b94b8 commit 7f45d63

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
## Version 2021/11/29
2+
# make sure that your dns has a cname set for openvscode-server
3+
4+
server {
5+
listen 443 ssl;
6+
listen [::]:443 ssl;
7+
8+
server_name openvscode-server.*;
9+
10+
include /config/nginx/ssl.conf;
11+
12+
client_max_body_size 0;
13+
14+
# enable for ldap auth, fill in ldap details in ldap.conf
15+
#include /config/nginx/ldap.conf;
16+
17+
# enable for Authelia
18+
#include /config/nginx/authelia-server.conf;
19+
20+
location / {
21+
# enable the next two lines for http auth
22+
#auth_basic "Restricted";
23+
#auth_basic_user_file /config/nginx/.htpasswd;
24+
25+
# enable the next two lines for ldap auth
26+
#auth_request /auth;
27+
#error_page 401 =200 /ldaplogin;
28+
29+
# enable for Authelia
30+
#include /config/nginx/authelia-location.conf;
31+
32+
include /config/nginx/proxy.conf;
33+
include /config/nginx/resolver.conf;
34+
set $upstream_app openvscode-server;
35+
set $upstream_port 3000;
36+
set $upstream_proto http;
37+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
38+
39+
}
40+
}
41+
42+
server {
43+
listen 443 ssl;
44+
listen [::]:443 ssl;
45+
46+
server_name "~^(?<upstream_port>[0-9]{1,10})\.openvscode-server\..*$";
47+
48+
include /config/nginx/ssl.conf;
49+
50+
client_max_body_size 0;
51+
52+
# enable for ldap auth, fill in ldap details in ldap.conf
53+
#include /config/nginx/ldap.conf;
54+
55+
# enable for Authelia
56+
#include /config/nginx/authelia-server.conf;
57+
58+
location / {
59+
# enable the next two lines for http auth
60+
#auth_basic "Restricted";
61+
#auth_basic_user_file /config/nginx/.htpasswd;
62+
63+
# enable the next two lines for ldap auth
64+
#auth_request /auth;
65+
#error_page 401 =200 /ldaplogin;
66+
67+
# enable for Authelia
68+
#include /config/nginx/authelia-location.conf;
69+
70+
include /config/nginx/proxy.conf;
71+
include /config/nginx/resolver.conf;
72+
set $upstream_app openvscode-server;
73+
set $upstream_proto http;
74+
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
75+
76+
}
77+
}

0 commit comments

Comments
 (0)