[英]no index.lighttpd.html in var/www/html
I would like to remotely control Raspberry Pi 3B+ through flask and lighttpd.我想通过 flask 和 lighttpd 远程控制树莓派 3B+。
I would like to control the RC car through the web.我想通过web来控制遥控车。
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-pip
sudo pip install flask
sudo apt-get install lighttpd
sudo apt autoremove
After the above commands, the /var/www/html
folder is created.执行上述命令后,创建了
/var/www/html
文件夹。 Also, lighttpd.conf
is created in /etc/lighttpd/
.此外,在
/etc/lighttpd/
lighttpd.conf
创建了 lighttpd.conf。 However, index.lighttpd.html
is not created in /var/www/html
.但是,
index.lighttpd.html
不是在/var/www/html
中创建的。 So even if I turn on localhost on the web, lighttpd does not come out.所以即使我在 web 上打开 localhost,lighttpd 也不会出来。
I have tried a lot of things.我已经尝试了很多东西。 I tried again several times after initializing the sd card.
初始化sd卡后我又试了几次。 I received the lighttpd file directly through the 'git clone' without using the pip, but the result was the same.
我没有使用 pip,而是直接通过 'git clone' 收到了 lighttpd 文件,但结果是一样的。
sudo apt-get install python3-flask sudo apt-get install python3-flask
server.document-root = "/var/www/html"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
server.port = 80
What should I do?我应该怎么办?
echo "<html><body>Hello World.</body></html>" > /var/www/html/index.html
It's your web server instance. echo "<html><body>Hello World.</body></html>" > /var/www/html/index.html
这是您的 web 服务器实例。 You need to configure the content to be served.您需要配置要提供的内容。 I'd recommend reading the lighttpd docs on https://wiki.lighttpd.net/
我建议阅读https://wiki.lighttpd.net/上的 lighttpd 文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.