当前位置:网站首页>Use ngrok to optimize web pages on raspberry pi (1)
Use ngrok to optimize web pages on raspberry pi (1)
2022-08-04 22:19:00 【probezy】
In the previous introduction, we showed you how to build a complete web page on the Raspberry Pi and use ngrok to publish it to the Internet. At this time, the web page is already a fully functional web page. WeUse this page to store photos or videos and share them with everyone when you need them.But if we want visitors to be interested in our page, or use it for commercial purposes, we need to further polish it.Now, we will show you how to make our web pages more perfect.
I believe that when you surf the Internet, you will often see that some webpages are named addresses of published articles, which allows us to find this webpage more quickly in the vast network, and also deepens the impression of visitors.In fact, it is not complicated to achieve this function, as long as the rewrite function is enabled in wordpress and the corresponding settings can be achieved.
First, we enter the wordpress dashboard page of the Raspberry Pi (enter http://localhost:wp-admin in the Raspberry Pi browser address), click the "Settings" item, and select the "Permalink" page from it., and then click the "Article Name" item.After making your selections, click the "Save Changes" button below to save your settings.

After completing the setting of wordpress, we also need to set the host apache running on the web page, otherwise the web page link will be invalid.Enter the following command in the command line interface of the Raspberry Pi to enable the rewrite module of apache2
sudo a2enmod rewrite
Enter the following command again to set the virtual host (apache) to allow override requests.
sudo nano /etc/apache2/sites-available/000-default.conf
After the command is input, the apache setting interface looks like this, and we need to insert a new command at the position marked by the red line (enter after the first line, and open another line to input the command), here we needNote that since the command line is strictly case-sensitive and the symbols are full-width, it is best to copy the commands in the text to avoid situations where they cannot be executed.

instruction is inserted, it looks like this.It is important to pay attention to the space position at the front of the directive.

After entering the command, you can press "ctrl+o" to save and exit.For our new settings to take effect, it is best to enter the command
sudo service apache2 restartRestart apache once for our new settings to take effect.
After completing the setting of displaying the article name in the webpage address, the webpage address on the Raspberry Pi can be customized, so that our webpage can display its own characteristics (such as displaying the company name, blog name or even the person's name)Wait).Since there are many custom content for web domain names, we will introduce them in detail in the next article.If you have any questions about the use of ngrok, please contact us, and we will certainly provide you with assistance within our ability.Of course, you are also welcome to join ngrok's official VIP group to explore the infinite potential of ngrok together.
边栏推荐
猜你喜欢

y87.第五章 分布式链路追踪系统 -- 分布式链路追踪系统起源(一)

搬走地下空间开发利用“绊脚石” 中地数码取得地下空间透明化技术突破

三个多月、40余场面试浓缩为6000字

Lecture 2 Software Life Cycle

Flutter 实现背景图片毛玻璃效果

使用cpolar优化树莓派上的网页(2)

Open source summer | Cloud server ECS installs Mysql, JDK, RocketMQ

Analysis and treatment of Ramnit infectious virus

【组成原理 六 存储器类型】

炽热如初 向新而生|ISC2022 HackingClub白帽峰会圆满举办!
随机推荐
CountDownLatch使用及原理
ROS播包可视化
How to right use of WebSocket in project
第二讲 软件生命周期
Altium Designer 19.1.18 - 画多边形铜皮挖空时,针对光标胡乱捕获的解决方法
Detailed usage of LocalDateTime
Ts——项目实战应用enum枚举
Altium Designer 19.1.18 - draw polygons copper hollow out, for the cursor just capture solutions
AXI interface application of Zynq Fpga image processing - the use of axi_lite interface
OC-归档(序列化)(了解的不多 没细看)
Rocketchip RISC-V Debug调试硬件相关(四)hartIsInReset
多个平台显示IP属地,必须大力推行互联网实名制
rk3399-0.0 svc命令
ES6高级-async的用法
【TCP/IP 五 ICMP】
打卡第 1 天:正则表达式学习总结
老叶的三束玫瑰
VSCode—常用快捷键(持续记录
openresty lua-resty-template页面静态化
In which industries is the PMP certificate useful?