45 lines
1.4 KiB
Markdown
45 lines
1.4 KiB
Markdown
|
# Landing Page
|
||
|
|
||
|
The below commands will setup a basic web server and a landing page for your PiFrame. This is meant to help you remember where 'all the things' are located and provide quick access as desired.
|
||
|
|
||
|
## Important Notes
|
||
|
|
||
|
* You'll need to adjust the below HTML to use the proper ip address of your PiFrame
|
||
|
* This setup uses ```lighttpd``` as it's very performant and resource lean. More so than ```nginx```
|
||
|
* All but the ```cockpit``` link below are for services that appear later in our documentation, all of them optional
|
||
|
|
||
|
## Setup
|
||
|
|
||
|
``` sh
|
||
|
|
||
|
########################################
|
||
|
# web server w/ useful links
|
||
|
########################################
|
||
|
|
||
|
pacman -S lighttpd
|
||
|
mkdir /etc/lighttpd/conf.d
|
||
|
echo "include \"/etc/lighttpd/conf.d/*.conf\"" >> /etc/lighttpd/lighttpd.conf
|
||
|
mkdir /srv/http
|
||
|
cat > /srv/http/index.html <<EOF
|
||
|
<html>
|
||
|
|
||
|
<head>
|
||
|
<title>PiFrame</title>
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<p><a href="http://127.0.0.1:9090">CockPit Web Management</a></p>
|
||
|
<p><a href="http://127.0.0.1:2812">Monit Monitoring</a></p>
|
||
|
<p><a href="http://127.0.0.1:2813">Munin Monitoring</a></p>
|
||
|
<p><a href="http://127.0.0.1:8384">Syncthing Admin Interface</a></p>
|
||
|
<p><a href="http://127.0.0.1:9191">Picture File Browser</a></p>
|
||
|
</body>
|
||
|
</html>
|
||
|
EOF
|
||
|
firewall-cmd --zone=public --permanent --add-service=http
|
||
|
firewall-cmd --zone=public --permanent --add-service=https
|
||
|
firewall-cmd --reload
|
||
|
systemctl enable --now lighttpd
|
||
|
|
||
|
```
|