宝塔内安装code-server并配置ssl
1、下载 和解压
我挂了 代理
|
|
mkdir /opt/ tar -zxvf code-server* -C /opt/ cd /opt mv code-server* code-server
|
|
cd /opt/code-server mkdir data extensions nano config.yaml
|
|
bind-addr: 0.0.0.0:8485 # 最好改为 127.0.0.1 仅限nginx反代访问 auth: password password: 123456 cert: false user-data-dir: /opt/code-server/data/ extensions-dir: /opt/code-server/extensions/
|
|
./bin/code-server –config /opt/code-server/config.yaml 最新版本在 bin目录下 提示下面信息 就ok,如果有条件可以打开 http://你的ip:8485/ 试试,因为我这里是没有权限访问8485这个端口的。所以 直接跳过,ctrl+c 取消运行 ,去宝塔 继续操作 2022-10-04T04:02:39.307Z] info code-server 4.7.1 77bbed48315a7cc275dc05a53d197197928f4b88 [2022-10-04T04:02:39.308Z] info Using user-data-dir /opt/code-server/data [2022-10-04T04:02:39.333Z] info Using config file /opt/code-server/config.yaml [2022-10-04T04:02:39.333Z] info HTTP server listening on http://0.0.0.0:8485/ [2022-10-04T04:02:39.333Z] info - Authentication is enabled [2022-10-04T04:02:39.333Z] info - Using password from /opt/code-server/config.yaml [2022-10-04T04:02:39.333Z] info - Not serving HTTPS
|
|
可执行文件:/opt/code-server/bin/code-server 端口:8485 和前面一样 命令:/opt/code-server/bin/code-server –config /opt/code-server/config.yaml 运行用户:建议选择root 域名选一个输入,可以带端口
|
|