Skip to content

Commit 8527d10

Browse files
authored
Merge pull request coder#172 from korzq/patch-1
Add nginx reverse proxy guide for selfhosted
2 parents 4387fdf + 4388085 commit 8527d10

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/self-hosted/index.md

+15
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,20 @@ OPTIONS
7474
7575
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../security/ssl.md)
7676
77+
### Nginx Reverse Proxy
78+
Nginx is for reverse proxy. Here is a example virtual host that works with code-server. Please also pass --allow-http. You can also use certbot by EFF to get a ssl certificates for free.
79+
```
80+
server {
81+
listen 80;
82+
listen [::]:80;
83+
server_name code.example.com code.example.org;
84+
location / {
85+
proxy_pass http://localhost:8443/;
86+
proxy_set_header Upgrade $http_upgrade;
87+
proxy_set_header Connection upgrade;
88+
}
89+
}
90+
```
91+
7792
### Help
7893
Use `code-server -h` or `code-server --help` to view the usage for the cli. This is also shown at the beginning of this section.

0 commit comments

Comments
 (0)