当前位置:网站首页>建立自己的网站(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的无限潜能。
边栏推荐
- 【剑指 Offer 】64. 求1+2+…+n
- 爱可可AI前沿推介(7.3)
- [combinatorics] polynomial theorem (polynomial theorem | polynomial theorem proof | polynomial theorem inference 1 item number is the number of non negative integer solutions | polynomial theorem infe
- word 退格键删除不了选中文本,只能按delete
- 面试之 top k问题
- 网络安全web渗透技术
- Data driving of appium framework for mobile terminal automated testing
- 8个酷炫可视化图表,快速写出老板爱看的可视化分析报告
- One article takes you to understand machine learning
- function overloading
猜你喜欢

CC2530 common registers for ADC single channel conversion

What material is 13crmo4-5 equivalent to in China? 13crmo4-5 chemical composition 13crmo4-5 mechanical properties

Recommendation of good books on learning QT programming

Google Earth engine (GEE) - daymet v4: daily surface weather data set (1000m resolution) including data acquisition methods for each day

Visual SLAM algorithms: a survey from 2010 to 2016

美团一面:为什么线程崩溃崩溃不会导致 JVM 崩溃
The way of wisdom (unity of knowledge and action)

ucore概述

arduino-esp32:LVGL项目(一)整体框架

One article takes you to understand machine learning
随机推荐
Threejs Part 2: vertex concept, geometry structure
Hands on in-depth learning notes (XIV) 3.7 Simple implementation of softmax regression
Learn from me about the enterprise flutter project: simplified framework demo reference
Develop team OKR in the way of "crowdfunding"
Kindeditor editor upload image ultra wide automatic compression -php code
"The NTP socket is in use, exiting" appears when ntpdate synchronizes the time
13mnnimo5-4 German standard steel plate 13MnNiMo54 boiler steel 13MnNiMo54 chemical properties
Svn usage specification
Necessary ability of data analysis
What material is 12cr1movr? Chemical property analysis of pressure vessel steel plate 12cr1movr
CC2530 common registers for serial communication
Caching mechanism of Hibernate / session level caching mechanism
What is the pledge pool and how to pledge?
于文文、胡夏等明星带你玩转派对 皮皮APP点燃你的夏日
斑馬識別成狗,AI犯錯的原因被斯坦福找到了
What material is sa537cl2? Analysis of mechanical properties of American standard container plate
Kotlin学习快速入门(7)——扩展的妙用
RF analyze demo build step by step
The word backspace key cannot delete the selected text, so you can only press Delete
Leetcode binary search tree