You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/self-hosted/index.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -82,23 +82,23 @@ Options:
82
82
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../security/ssl.md)
83
83
84
84
### Nginx Reverse Proxy
85
-
Nginx is for reverse proxy. Below is a virtual host example that works with code-server. Please also pass --allow-http. You can also use certbot by EFF to get a ssl certificates for free.
85
+
Below is a virtual host example that works with code-server. Please also pass `--allow-http` and `--trust-proxy` to code-server to allow the proxy to connect. You can also use Let's Encrypt to get a SSL certificates for free.
86
86
```
87
87
server {
88
88
listen 80;
89
89
listen [::]:80;
90
90
server_name code.example.com code.example.org;
91
-
location / {
92
-
proxy_pass http://localhost:8443/;
93
-
proxy_set_header Upgrade $http_upgrade;
94
-
proxy_set_header Connection upgrade;
95
-
proxy_set_header Accept-Encoding gzip;
96
-
}
97
-
}
91
+
location / {
92
+
proxy_pass http://localhost:8443/;
93
+
proxy_set_header Upgrade $http_upgrade;
94
+
proxy_set_header Connection upgrade;
95
+
proxy_set_header Accept-Encoding gzip;
96
+
}
97
+
}
98
98
```
99
99
100
100
### Apache Reverse Proxy
101
-
Example of https virtualhost configuration for Apache as a reverse proxy. Please also pass --allow-http on code-server startup to allow the proxy to connect.
101
+
Example of a HTTPS virtualhost configuration for Apache as a reverse proxy. Please also pass `--allow-http` and `--trust-proxy` to code-server to allow the proxy to connect. You can also use Let's Encrypt to get a SSL certificates for free.
0 commit comments