安装
1 2 3
| wget https://code-server.dev/install.sh sh ./install.sh
|
1
| vi ~/.config/code-server/config.yaml
|
1 2 3 4
| bind-addr: 127.0.0.1:8098 auth: password password: 1a980e9 cert: false
|
配置
反向代理配置参考,不这么设置可能出现登陆成功验证失败,一直让刷新
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| location ~* \.(gif|png|jpg|css|js|woff|woff2)$ { proxy_pass http://127.0.0.1:8098; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade; proxy_set_header Accept-Encoding gzip; expires 12h; } location / { proxy_pass http://127.0.0.1:8098; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade; proxy_set_header Accept-Encoding gzip; }
|
登陆