当前位置:网站首页>建立自己的网站(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的无限潜能。
边栏推荐
- 2022 love analysis · panoramic report of digital manufacturers of state-owned enterprises
- CC2530 common registers for serial communication
- 斑马识别成狗,AI犯错的原因被斯坦福找到了
- IL Runtime
- Hong Kong Polytechnic University | data efficient reinforcement learning and adaptive optimal perimeter control of network traffic dynamics
- What material is 12cr1movr? Chemical property analysis of pressure vessel steel plate 12cr1movr
- 8 tips for effective performance evaluation
- Using optimistic lock and pessimistic lock in MySQL to realize distributed lock
- "The NTP socket is in use, exiting" appears when ntpdate synchronizes the time
- 数据分析必备的能力
猜你喜欢

Aike AI frontier promotion (7.3)

TCP congestion control details | 3 design space

CC2530 common registers for port initialization

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

What material is sa537cl1? Sa537cl1 corresponds to the national standard material

QT串口ui设计和解决显示中文乱码

【LeetCode】94. Middle order traversal of binary tree

Unreal_ Datatable implements ID self increment and sets rowname

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

跟我学企业级flutter项目:简化框架demo参考
随机推荐
Extraction of the same pointcut
CC2530 common registers for port interrupts
【剑指 Offer】58 - II. 左旋转字符串
Golang anonymous function use
QT串口ui设计和解决显示中文乱码
Informatics Olympiad all in one YBT 1175: divide by 13 | openjudge noi 1.13 27: divide by 13
Mongodb installation and basic operation
爱可可AI前沿推介(7.3)
RF Analyze Demo搭建 Step by Step
PHP secondary domain name session sharing scheme
Leetcode binary search tree
Record windows10 installation tensorflow-gpu2.4.0
TCP congestion control details | 3 design space
CC2530 common registers for timer 1
Capacités nécessaires à l'analyse des données
Acwing game 58
mysql用户管理
网络安全web渗透技术
Golang decorator mode and its use in NSQ
中南大学|通过探索理解: 发现具有深度强化学习的可解释特征