当前位置:网站首页>建立自己的网站(23)
建立自己的网站(23)
2022-07-03 16:49:00 【probezy】
在上篇文章中,我们从阿里云下载了网站的安全证书,但这个证书想要生效,还需要进行相应的配置,而对其进行配置又需要使用VS code对cpolar的配置文件进行必要的修改。现在,我们就为大家介绍,如何对cpolar进行配置,使我们下载的网页安全文件生效。
首先,需要将下载的网站安全文件解压至特定文件夹,使得互联网访客访问时,能查阅到我们网站的安全证书。一般来说,网站的安全证书文件都会放在“certs”文件夹中,因此我们第一步就是建立“certs”文件夹。需要注意的,为避免文件调用出错,我们最好将“certs”文件夹建立在简单路径上。在这里,我们将certs文件夹放在D盘下。
在这个路径下,放的都是我们网站的相关文件夹,其中带有我们所购买域名的压缩文件和文件夹,就是安全证书和密钥。接着我们再在“certs”文件夹下,建立“site1”文件夹,并将两个网站安全文件粘贴至其中,

在放置好网站安全文件后,我们要记住这些安全文件的路径,然后打开VS code,对cpolar的配置文件进行修改,让cpolar知道这两个安全文件所在位置,使其能够在有需要时进行调用。
在这里,我们需要找到要进行安全文件配置的隧道名称(这个例子中是timelinenotes隧道),并在箭头所指位置中,插入两个安全文件的存放路径及文件名。
由于我们的网站安全文件存放于D盘certs文件夹中的site1文件夹下,因此需要输入的参数即为:
crt:D:\certs\site1\ 7744973_www.timelinenotes.xyz.pem
key:D:\certs\site1\ 7744973_www.timelinenotes.xyz.key
这两个参数每个用户不同(区别在于安全文件存放的位置,以及安全文件本身的编号不同),因此需要据实情况输入。输入完毕后,看起来就是这样的:
完成这步配置后,我们重启cpolar,就能通过https的前缀名,访问到我们的网站了。同时,网站域名前的“”也会点亮,标志着我们的网站是安全网站。
至此,我们通过cpolar,将本地网站发布到公网的工作就全部完成了。将网页放到本地电脑上,能够节约租用网络服务器(以往的网站都必须租用服务器搭建)的大笔费用,对于个人和小型企业建站十分合适。不过cpolar的作用并不仅仅局限于搭建网站,它还能在网页测试、远程办公、内网数据发布、搭建小型服务器等多个方面大展身手。如果您对cpolar有任何疑问,欢迎与我们联系,我们必将为您提供力所能及的协助。当然也欢迎vip客户加入cpolar官方群,共同探索cpolar的无限潜能。
边栏推荐
- PyTorch 1.12发布,正式支持苹果M1芯片GPU加速,修复众多Bug
- Simulink oscilloscope data is imported into Matlab and drawn
- MySQL Basics
- How to allow remote connection to MySQL server on Linux system?
- Preventing/catching “IllegalArgumentException: parameter must be a descendant of this view” error
- What is the pledge pool and how to pledge?
- 跟我学企业级flutter项目:简化框架demo参考
- 浅谈拉格朗日插值及其应用
- 斑馬識別成狗,AI犯錯的原因被斯坦福找到了
- NLP four paradigms: paradigm 1: fully supervised learning in the era of non neural networks (Feature Engineering); Paradigm 2: fully supervised learning based on neural network (Architecture Engineeri
猜你喜欢

Idea configuration plug-in

Pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs

What is the material of sa302grc? American standard container plate sa302grc chemical composition

(补)双指针专题

CC2530 common registers for watchdog

Data driving of appium framework for mobile terminal automated testing

Threejs Part 2: vertex concept, geometry structure

Mysql 将逗号隔开的属性字段数据由列转行

斑馬識別成狗,AI犯錯的原因被斯坦福找到了

Google Earth engine (GEE) - daymet v4: daily surface weather data set (1000m resolution) including data acquisition methods for each day
随机推荐
To resist 7-Zip, list "three sins"? Netizen: "is the third key?"
Threejs Part 2: vertex concept, geometry structure
Acwing game 58
为抵制 7-Zip,列出 “三宗罪” ?网友:“第3个才是重点吧?”
【剑指 Offer】58 - II. 左旋转字符串
Register in PHP_ Globals parameter settings
Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
Custom plug-in construction and use of QT plug-in
NLP four paradigms: paradigm 1: fully supervised learning in the era of non neural networks (Feature Engineering); Paradigm 2: fully supervised learning based on neural network (Architecture Engineeri
LeetCode 1656. Design ordered flow
Svn usage specification
[solved] access denied for user 'root' @ 'localhost' (using password: yes)
The way of wisdom (unity of knowledge and action)
Preventing/catching “IllegalArgumentException: parameter must be a descendant of this view” error
14 topics for performance interviews between superiors and subordinates (4)
Explore Netease's large-scale automated testing solutions see here see here
Google Earth engine (GEE) - daymet v4: daily surface weather data set (1000m resolution) including data acquisition methods for each day
On Lagrange interpolation and its application
[Jianzhi offer] 58 - ii Rotate string left
"The NTP socket is in use, exiting" appears when ntpdate synchronizes the time