[英]Captive portal using raspberry pi
I am making an captive portal using the apache server:(raspberry pi)我正在使用 apache 服务器制作一个强制门户:(树莓派)
I have 2 ports-> 20.20.20.2 and 10001=>(20.20.20.2-10001)我有 2 个端口-> 20.20.20.2 和 10001=>(20.20.20.2-10001)
This is the method I followed:这是我遵循的方法:
(Also refer to this article: http://www.raspberrypi.org/documentation/remote-access/web-server/apache.md ) (另请参考这篇文章: http : //www.raspberrypi.org/documentation/remote-access/web-server/apache.md )
And I have entered the IP in the browser but it is redirecting me to the Port 20.20.20.2 but I want it to go to the index.html file(default file ) in the apache server.我已经在浏览器中输入了 IP,但它正在将我重定向到端口 20.20.20.2,但我希望它转到 apache 服务器中的 index.html 文件(默认文件)。
Please help!请帮忙! The apache server is running fine but when I connect to the raspberry pi its not redirecting it to the index.html file. apache 服务器运行良好,但是当我连接到 raspberry pi 时,它没有将其重定向到 index.html 文件。 Please let me know the possible errors请让我知道可能的错误
If you need more information please comment如果您需要更多信息,请发表评论
I also looked for a solution for captiv portal.我还寻找了 captiv 门户的解决方案。 A solution that worked for me was nodogsplash .对我有用的解决方案是nodogsplash 。
Instructions and a repository for debian (also Raspian) can be downloaded from the Github page : https://github.com/nodogsplash/nodogsplash可以从 Github 页面下载 debian(也是 Raspian)的说明和存储库: https : //github.com/nodogsplash/nodogsplash
Install library for compile安装库进行编译
sudo apt install git libmicrohttpd-dev
Clone Repository克隆库
git clone https://github.com/nodogsplash/nodogsplash.git
Compile and install编译安装
cd ~/nodogsplash
make
sudo make install
Set your configuration设置您的配置
sudo nano /etc/nodogsplash/nodogsplash.conf
And Reboot the os并重新启动操作系统
I hope this answer helps我希望这个答案有帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.