deepin 安装 vscode server 服务器版 Code Server 并配置ssl加密 以及nginx反代

deepin 安装 vscode server 服务器版 Code Server 并配置ssl加密 以及nginx反代

https://github.com/coder/code-server/releases

加速 下载 https://gh.api.99988866.xyz/https://github.com/coder/code-server/releases/download/v4.5.0/code-server_4.5.0_amd64.deb

双击安装 或者dkpg安装 然后启动 systemctl –user start code-server systemctl –user enable code-server vi ~/.config/code-server/config.yaml 修改密码 systemctl –user restart code-server 内容:

    location / { proxy_pass http://127.0.0.1:8080; proxy_http_version 1.1; 
    proxy_redirect off; 
    proxy_set_header Host http://code.leiyanhui.com; 
    proxy_set_header X-Real-IP $remote_addr; 
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
    proxy_set_header REMOTE-HOST $remote_addr; 
    proxy_set_header Upgrade $http_upgrade; 
    proxy_set_header Connection "Upgrade"; 
    proxy_connect_timeout 60; proxy_send_timeout 90; 
    proxy_read_timeout 90; 
    proxy_buffer_size 4k; 
    proxy_buffers 4 32k; 
    proxy_busy_buffers_size 64k; 
    proxy_temp_file_write_size 64k; a
    dd_header X-Cache $upstream_cache_status; 
    add_header Cache-Control no-cache;
    } 

然后试着用http房屋 没问题了 了 再正常配置 ssl 就可以了 配置 开机自动启动 https://dev.leiyanhui.com/c/73

comments powered by Disqus