Comments (6)
github.io 只能放静态资源,接口没法用 github.io 的。当然你可以自己绑定 host 把 xx.github.io 设置为后台接口服务器的 IP,然后给 xx.github.io 自签证书,放到 cert/xx.github.io/ 下。
from jsproxy.
我的意思就是接口服务器部署在自己的VPS上, 然后用github.io存放静态资源, 只是想用它的域名. 麻烦再问下, 要怎么给自己的github.io签证书? 似乎无法操作它的dns...?
from jsproxy.
演示的方案就是“接口服务器部署在自己的VPS上, 然后用github.io存放静态资源”。
你说“公司电脑的域名限制, 无法访问自己的个人域名, 只能够访问*.github.io的域名”,那么自己的VPS域名解析不出来,所以说在本地把 xx.github.io 的域名绑定成你的 VPS IP。
from jsproxy.
不好意思, 可能是我没表达清楚.
我现在的目标就是想把大佬你的演示方案部署在自己的VPS和github.io域名下, 但是不知道哪一步出了问题, 一直显示内容损坏错误. 我大概的配置步骤如下:
- 创建新的jsproxy用户, clone项目,执行
./nginx-setup.sh
安装nginx. - 只修改了
nginx.conf
中的server_name
为自己的xx.github.io
域名, 监听端口为默认的8080
不变. 其他配置项均未更改. git clone
了jsproxy-browser项目, 在proxy/src/conf.js
新增了NODE_MAP
, 地址为xxx.xxx.xxx.xxx:8080
(我的VPS IP), 对应修改了NODE_DEF
. 然后执行了proxy/debug.sh
.- 在
home/index.html
中修改了selNode元素, 新增了上面添加的NODE_MAP
, 然后执行了home/build.sh
. - 将生成的www目录内的内容push到xxx.github.io仓库里面.
防火墙的8080端口确认是开放着的. 用火狐浏览器访问会得到如下页面
proxy.log中的日志记录的后面三个数字是 0 303 和 400
如有错误, 烦请指出!
from jsproxy.
后端:先申请一个域名 example.com,修改 nginx.conf 中的 server_name 为 example.com。然后给 example.com 申请证书(参考 gen-cert 目录或者去 sslforfree 网站申请)。把注释的那几行打开 8443。
前端:proxy/src/conf.js 里设置的是 example.com(不是 IP!因为 IP 地址没法申请免费证书)
from jsproxy.
谢谢, 了解了
from jsproxy.
Related Issues (20)
- 这个脚本坏了 HOT 4
- 问题 HOT 2
- 自定义域名报错,但cf给的域名就没问题
- 能不能有个简单教程,怎么部署程序,放在自己以前安装的nginx里面。自己反代 HOT 3
- 无 HOT 1
- 手动安装成功了,只有几步需要修改一下 HOT 7
- 这个项目不维护了? HOT 2
- 网页代理翻墙 HOT 2
- [Feature Request] serviceworker auto loading in proxy page
- 推荐一个超级牛逼的 HOT 4
- docker 镜像,支持 x86_64 和 arm/v8 HOT 9
- Workers requests timeout after 30 seconds
- 请问如何手动安装证书 HOT 1
- 布署到cloudflare workers上, 但找不到修改首页的地方
- 部分情况下无法加载/逃逸 HOT 2
- 尝试搭建了CF的,怎么打不开?是失效了吗 HOT 2
- 给你们推荐一个同类产品 HOT 1
- how to build the assets of gh-page branch
- 请问, CF版如何让它不要跳转https://, 众所周知https://的.workers.dev被sni阻断了,http的可用, 但是脚本会自动跳转https...导致直连不可用哈. HOT 1
- 有没有讨论的群? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsproxy.