edgeone+cloudflare免费部署个人网站Deploy Personal Website with EdgeOne + Cloudflare for Free


AI free token/AI免费积分

本文来源:https://mp.weixin.qq.com/s/PMoDRZ8464PGWVQH7K_93A
若有版权问题,请来信告知:13951431913#139.com 或在右方提交评论。

本篇内容有点多,主要是说如何免魔法部署个人网站:

  • 免费将你的网站发布到互联网,国内可访问
  • 免费域名

操作比较复杂,按下面的流程估计要1小时左右一、前言我的信用卡比较多,为了方便我每次刷卡尽量做到最大免息,我以前将信用卡信息做了表格放手机里面,每次刷卡之前打开看看。现在不是AI厉害了么,我就想折腾AI做个刷卡、还款的网页,将家里人的卡都放进去,用的时候就更加方便。网页是做好了,但是这玩意要部署到网络上,才能方便使用,这就难为我了,试了很多办法,

  • github pages 国内访问不方便
  • 腾讯cos 静态网页功能关闭了
  • 做成单html文件直接放手机,手机浏览器不能通过桌面快捷方式快速访问

麻了,这么一个小东西难道还要付费?这成本就整高了。后来终于找到一个腾讯的方案,目前是全免费,未来啥情况,不知道,先白嫖再说。二、先做一个测试网站首先假定你已经有一个网站了,如果没有,可以将下列代码复制到记事本,然后保存为index.html,下面的讲解就用这个测试。

            测试网页    你在浏览器看到这行字就说明成功了

三、通过edgeone部署网站访问edgeone官网,然后点击右上角 开始https://edgeone.ai/zh可以用google邮箱注册,我是直接用的QQ邮箱,地区就是默认的香港,不要改。图片注册成功后就进入配置页面,点击创建项目,因为我的是做好的html,所以选择:通过上传文件创建,图片加速区域一定要选:全球可用区(不含中国大陆)不然就需要实名+备案,选择刚才保存的index.html后点部署如果你是做好的整站,就选择文件夹上传,但首页是index.html图片然后我等待了17秒就部署好了,接下来点击预览图片会得到一个有效期3小时的预览地址,复制这个地址就可以在外网访问你的网站了。图片图片简单吧,这样我们做的网站就成功部署到互联网上了,任何设备都是可以访问的。但是这个有效期只有3小时,需要有自己的域名才能持续使用。四、注册免费域名搞个免费的域名去,这一步必须要有github账号才行,访问

https://digitalplat.org/

免费域名不适合商用、正式项目,个人网站、博客是可以的。

图片

点击顶上的projects,然后点击 Get a domain。

图片弹出新页面点击右上的  Get Started图片

然后注册

  • 邮箱必须真,需要收验证码

  • 姓名中间要空格

  • 电话填 +86-xxx,可不真

  • 地址随便,可不真

图片

然后邮箱会收到验证码,输入验证后会返回到登录页面,用刚才的邮箱和密码登录。

登录成功后会要求通过github进行身份验证KYC

图片KYC后进入仪表盘,公告中提示去github给他们的项目star就可以再给一个免费域名,走起图片先点1去github,然后点star,再回来点2验证(如果github打不开,多试几次,不做这个也没影响,已经有一个免费域名了)图片图片

 

如果github点star成功,仪表盘下面能看到有两个免费槽位

图片然后右侧点击注册,前面输入你的前缀,现在只有dpdns.org和qd.je这两个域名免费了,以前全免费的,前面公告有说明原因,吃屎都得赶早啊,知道的太晚了。图片前缀+后缀组合后的域名例如:

  • myblog.qd.je
  • mysite.dpdns.org
  • crypto.qd.je

输入前缀和后缀后,如果前缀已经被注册,检查会提示,未被注册就会弹出确认对话框,ns名称服务器先不填,点注册完成。

图片

之后弹出的页面先不要关,等会儿还要填ns服务器。

 

五、Cloudflare 托管

最开始我以为有域名就可以绑定到edgeone了,结果大陆区域必须实名+备案,而非大陆区域edgeone规则又不能加速,国内访问就是401,所以只能再找个中间商了,有请大名鼎鼎的cloudflare(还记得去年11月X、FB、GPT、安安、易易都不能用吗?就是它崩了)。

https://www.cloudflare-cn.com/

注册登录就不说了。

在 账户主页,选择 添加域名

图片然后 连接域名图片填写刚才在 digitalplat 注册的免费域名,继续图片选择第一个 免费计划图片点 继续前往激活图片分别复制 这里的 两个 ns服务器图片将复制的 ns服务器 分别粘贴到 digitalplat ,再点击更新。(这里补以一句,这里能看到域名有效期是1年,到期前120天需要来点一下续期)图片再返回到 cloudflare,点 我已更新名称服务器。图片等几分钟再点击 立即检查名称服务器图片如果出现下面的信息就说明生效了。图片如果提示还不可用,再等会从 域名 - 概览 进去查看图片状态是活动就可以了。图片六、将edgeone 项目与 cloudflare 域名绑定回到edgeone控制台,服务总览 - Makers - 后面三个点 - 最近部署图片然后 域名管理 - 添加自定义域名图片这里要填写你的域名,假设刚才在digitalplat注册的域名是 abc.dpdns.org。我们可以在前面加 xxx. ,可以任意的加,比如cards.abc.dpdns.org、images.abc.dpdns.org、blog.abc.dpdns.org图片然后会弹出下面的信息,需要回到cloudflare添加这个记录才能解析验证,注意我标注的A、B、C三个信息图片回到cloudflare,概览 - 找到刚才添加的域名 - 后面三个点 - 配置DNS图片然后 添加记录图片将刚才edgeone提供的A、B、C三个信息,对应粘贴图片再回到edgeone,等一小会能看到验证成功,点 完成。图片然后又会提示 添加CNAME,一样,A、B、C三个信息图片再回到cloudflare,添加记录,需要注意B的信息只填写小数点前的部分还有一点,将代理状态关闭(截图时候忘记标注)图片返回edgeone,等一会显示成功,然后点击后面的HTTPS配置图片先打开强制HTTPS,再点配置证书图片选择 申请免费证书,保存图片又要等一会,其实不用HTTPS网站已经能正常访问了,不过chrome和edge浏览器会提示网站不安全。图片等几分钟后就提示HTTPS证书部署成功图片现在可以通过域名访问你的网站了。图片至此,你的网站就完全部署上互联网了,只要有网络就可以快速访问。全篇有很多新名词,要了解可以问问AI,这个主要适合练手,通过免费的云服务、域名、DNS、CDN,学习整个网站的发布过程,如果真的要做点啥商用项目,还是要花钱购买域名啥的,不然不能备案,不过该方案自己玩足够了。上面发布的网站仅仅是个测试页面,如果你的网站做好了,重新 构建部署 - 新建部署,重新上传就可以了。图片我将网站上传后,用手机浏览器打开刚才的域名cards.xxx.dpdns.org,速度很快,1秒左右。但每次都输域名太麻烦,所以点设置 - 添加到桌面(安卓手机需要桌面快捷方式权限)(截图我已经添加了,所以是灰的)图片手机桌面就有这个快捷方式了,以后就可以像打开APP一样方便了。图片

 

Source: https://mp.weixin.qq.com/s/PMoDRZ8464PGWVQH7K_93A. For copyright issues, please email: 13951431913#139.com or submit a comment on the right.

This content is quite lengthy, mainly explaining how to deploy a personal website without using a proxy:

Publish your website to the internet for free, accessible within China

Free domain

The operation is somewhat complex; following the process below should take about 1 hour. I. Introduction: I have many credit cards, and to maximize interest-free periods for each swipe, I previously created a spreadsheet with my card information stored on my phone to check before every transaction. Now that AI is so advanced, I decided to experiment by building a webpage for card swiping and repayment using AI, adding all family members' cards for easier use. The webpage is ready, but deploying it to the network for convenient access proved challenging. I tried many methods:

GitHub Pages is inconvenient to access from within China

Tencent COS static webpage functionality has been disabled

Creating a single HTML file to store directly on the phone; the mobile browser cannot access it quickly via a desktop shortcut

I was frustrated; does such a small thing really require payment? That would drive up the cost. Later, I finally found a Tencent solution that is currently completely free. Who knows what the future holds, but let's take advantage of it for now. II. First, create a test website. Assume you already have a website; if not, copy the following code into Notepad and save it as index.html. The following instructions will use this for testing.

III. Deploy the website via EdgeOne. Visit the EdgeOne official website, then click "Start" in the top right corner: https://edgeone.ai/zh. You can register with a Google email; I directly used a QQ email. The region defaults to Hong Kong; do not change it. After successful registration, you will enter the configuration page. Click "Create Project." Since I have a ready-made HTML file, select "Create by uploading files." The acceleration region must be selected as "Global Region (excluding mainland China); otherwise, real-name verification and filing will be required. After selecting the previously saved index.html, click "Deploy." If you have a complete website, choose folder upload, but the homepage must be index.html. I waited 17 seconds and the deployment was complete. Next, click "Preview" to obtain a preview URL valid for 3 hours. Copy this URL to access your website from the external network. Simple, right? This way, our website is successfully deployed to the internet and accessible from any device. However, this validity period is only 3 hours; you need your own domain for continuous use. IV. Register a free domain. Get a free domain; this step requires a GitHub account. Visit图片图片图片图片图片图片

https://digitalplat.org/

Free domains are not suitable for commercial or formal projects, but they are fine for personal websites and blogs.

图片

Click "Projects" at the top, then click "Get a domain."

A new page will pop up; click "Get Started" in the top right.图片图片

Then register.

The email must be real, as you need to receive a verification code.

There must be a space in the middle of the name.

For the phone number, fill in +86-xxx; it doesn't have to be real.

The address can be random; it doesn't have to be real.

图片

Then you will receive a verification code via email. After entering and verifying it, you will return to the login page. Log in using the email and password you just used.

After successful login, you will be asked to verify your identity via GitHub (KYC).

After KYC, enter the dashboard. The announcement indicates that if you star their project on GitHub, you can get another free domain. Let's go. First, click 1 to go to GitHub, click "Star," then return and click 2 to verify (if GitHub is inaccessible, try several times; not doing this has no impact, as you already have one free domain).图片图片图片图片

If the GitHub star is successful, you can see two free slots at the bottom of the dashboard.

Then click "Register" on the right. Enter your prefix at the front. Currently, only dpdns.org and qd.je domains are free; previously, all were free. The reason is explained in the front announcement. Even eating shit requires getting there early; I found out too late. The domain formed by prefix + suffix, for example:图片图片

myblog.qd.je

mysite.dpdns.org

crypto.qd.je

After entering the prefix and suffix, if the prefix is already registered, the check will prompt you. If it is not registered, a confirmation dialog will pop up. Do not fill in the NS name server for now; click "Register" to complete.

图片

Do not close the page that pops up afterwards; you will need to fill in the NS server later.

V. Cloudflare Hosting

Initially, I thought having a domain was enough to bind it to EdgeOne. However, for the mainland region, real-name verification and filing are required. For non-mainland regions, EdgeOne rules cannot accelerate, resulting in a 401 error for domestic access. Therefore, I had to find a middleman. Please welcome the famous Cloudflare (do you remember last November when X, FB, GPT, AnAn, and YiYi were all unusable? That was when it crashed).

https://www.cloudflare-cn.com/

Registration and login are not discussed here.

On the Account Homepage, select "Add Domain."

Then "Connect Domain." Enter the free domain you just registered on digitalplat. Continue. Select the first "Free Plan." Click "Continue to Activate." Copy the two NS servers here. Paste the copied NS servers into digitalplat respectively, then click "Update." (By the way, here you can see the domain validity is 1 year; you need to click to renew 120 days before expiration.) Return to Cloudflare and click "I have updated the nameservers." Wait a few minutes, then click "Check Nameservers Now." If the following information appears, it means it has taken effect. If it prompts that it is still unavailable, wait a bit and go to "Domain - Overview" to check. The status being "Active" is sufficient. VI. Bind the EdgeOne project with the Cloudflare domain. Return to the EdgeOne console: Service Overview - Makers - three dots - Recent Deployments. Then "Domain Management" - "Add Custom Domain." Here you need to fill in your domain. Assume the domain you registered on digitalplat is abc.dpdns.org. You can add xxx. in front; you can add anything arbitrarily, such as cards.abc.dpdns.org, images.abc.dpdns.org, blog.abc.dpdns.org. Then the following information will pop up. You need to return to Cloudflare to add this record for resolution verification. Pay attention to the three pieces of information I marked: A, B, and C. Return to Cloudflare: Overview - find the domain you just added - three dots - Configure DNS. Then "Add Record." Paste the three pieces of information A, B, and C provided by EdgeOne correspondingly. Return to EdgeOne and wait a moment; you will see the verification succeeded. Click "Complete." Then it will prompt "Add CNAME." Same thing: three pieces of information A, B, and C. Return to Cloudflare and add the record. Note that for information B, only fill in the part before the decimal point. Also, turn off the proxy status (I forgot to mark this in the screenshot). Return to EdgeOne, wait a moment for success, then click "HTTPS Configuration" afterwards. First, enable "Force HTTPS," then click "Configure Certificate." Select "Apply for Free Certificate" and save. Wait a moment again. Actually, the website can be accessed normally without HTTPS, but Chrome and Edge browsers will prompt that the website is unsafe. After a few minutes, it will prompt that the HTTPS certificate deployment is successful. Now you can access your website via the domain name. Thus, your website is fully deployed on the internet and can be accessed quickly as long as there is a network. There are many new terms in this article; if you want to understand them, you can ask AI. This is mainly suitable for practice, learning the entire website publishing process through free cloud services, domains, DNS, and CDN. If you really want to do some commercial projects, you still need to spend money to purchase domains, etc., otherwise you cannot file for record. However, this solution is sufficient for personal play. The website published above is just a test page. If your website is ready, simply "Rebuild Deploy" - "New Deployment" and upload again. After I uploaded the website, I opened the domain name cards.xxx.dpdns.org with my mobile browser; the speed was very fast, about 1 second. But typing the domain name every time is too troublesome, so I clicked Settings - Add to Desktop (Android phones require desktop shortcut permission). (I have already added it in the screenshot, so it is grayed out.) Now there is this shortcut on the mobile desktop, making it as convenient as opening an APP in the future.图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片图片

暂无评论,快来发表第一条评论吧!No comments yet. Be the first!

📮 需求咨询📮 Inquiry