简体   繁体   English

var/www/html 中没有 index.lighttpd.html

[英]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 install lighttpd lighttpd-doc sudo apt install lighttpd lighttpd-doc

sudo apt-get install python3-flask sudo apt-get install python3-flask

  • In addition, all the above commands were used.此外,使用了所有上述命令。 The lighttpd.conf file also seems to have no problem. lighttpd.conf 文件似乎也没有问题。
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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM