Giter Site home page Giter Site logo

Comments (6)

EtherDream avatar EtherDream commented on May 29, 2024

github.io 只能放静态资源,接口没法用 github.io 的。当然你可以自己绑定 host 把 xx.github.io 设置为后台接口服务器的 IP,然后给 xx.github.io 自签证书,放到 cert/xx.github.io/ 下。

from jsproxy.

JimmyTinsley avatar JimmyTinsley commented on May 29, 2024

我的意思就是接口服务器部署在自己的VPS上, 然后用github.io存放静态资源, 只是想用它的域名. 麻烦再问下, 要怎么给自己的github.io签证书? 似乎无法操作它的dns...?

from jsproxy.

EtherDream avatar EtherDream commented on May 29, 2024

演示的方案就是“接口服务器部署在自己的VPS上, 然后用github.io存放静态资源”。

你说“公司电脑的域名限制, 无法访问自己的个人域名, 只能够访问*.github.io的域名”,那么自己的VPS域名解析不出来,所以说在本地把 xx.github.io 的域名绑定成你的 VPS IP。

from jsproxy.

JimmyTinsley avatar JimmyTinsley commented on May 29, 2024

不好意思, 可能是我没表达清楚.
我现在的目标就是想把大佬你的演示方案部署在自己的VPS和github.io域名下, 但是不知道哪一步出了问题, 一直显示内容损坏错误. 我大概的配置步骤如下:

  1. 创建新的jsproxy用户, clone项目,执行./nginx-setup.sh安装nginx.
  2. 只修改了nginx.conf中的server_name为自己的xx.github.io域名, 监听端口为默认的8080不变. 其他配置项均未更改.
  3. git clone了jsproxy-browser项目, 在proxy/src/conf.js新增了NODE_MAP, 地址为xxx.xxx.xxx.xxx:8080(我的VPS IP), 对应修改了NODE_DEF. 然后执行了proxy/debug.sh.
  4. home/index.html中修改了selNode元素, 新增了上面添加的NODE_MAP, 然后执行了home/build.sh.
  5. 将生成的www目录内的内容push到xxx.github.io仓库里面.

防火墙的8080端口确认是开放着的. 用火狐浏览器访问会得到如下页面
图片
proxy.log中的日志记录的后面三个数字是 0 303 和 400

如有错误, 烦请指出!

from jsproxy.

EtherDream avatar EtherDream commented on May 29, 2024

后端:先申请一个域名 example.com,修改 nginx.conf 中的 server_name 为 example.com。然后给 example.com 申请证书(参考 gen-cert 目录或者去 sslforfree 网站申请)。把注释的那几行打开 8443。

前端:proxy/src/conf.js 里设置的是 example.com(不是 IP!因为 IP 地址没法申请免费证书)

from jsproxy.

JimmyTinsley avatar JimmyTinsley commented on May 29, 2024

谢谢, 了解了

from jsproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.