下载
https://github.com/cdr/code-server/releases
安装
tar xf code-server-3.6.2-linux-amd64.tar.gz
cd code-server-3.6.2-linux-amd64
# 启动
./code-server
# 关闭 并 编辑 ~/.config/code-server/config.yaml
cat ~/.config/code-server/config.yaml
bind-addr: 127.0.0.1:9090
auth: password
password: 123456
cert: false
# 保存重新启动
./code-server
nginx 代理
server {
server_name code.xxx.com;
listen 443 ssl;
listen 80;
ssl_certificate code.xxx.com.pem;
ssl_certificate_key code.xxx.com.key;
location / {
proxy_pass http://127.0.0.1:9090;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
}
}
网友评论