标签:https listen yaml 情况 apache2 ash uri head 基于
为了监测树莓派的运行情况,使用树莓派实验室的 Pi Dashboard 来实现,通过 Nginx 反向代理。
基于 debian 容器:
sudo docker run -i -t --name PiDashboard -p 10000:80 --net amber-net --ip 172.20.0.40 -d debian:latest
容器内执行命令:
apt install apache2 php libapache2-mod-php git
作者网站: Pi Dashboard 。
容器内执行命令:
cd /var/www/html
git clone https://github.com/spoonysonny/pi-dashboard.git
default.conf 文件:
upstream rasamber-pi-dashboard{
server 192.168.1.110:10000;
}
server{
listen 80;
return 301 https://$host$request_uri;
}
server{
listen 443 ssl;
server_name rasamber;
# SSL 设置
......
location /pi-dashboard/ {
proxy_pass http://rasamber-pi-dashboard/pi-dashboard/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Cookie $http_cookie;
proxy_cookie_path /pi-dashboard/ /;
}
}
标签:https listen yaml 情况 apache2 ash uri head 基于
原文地址:https://www.cnblogs.com/Yogile/p/13358129.html