mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-29 11:26:25 -05:00
Customizing nginx error page to help user start wrolpi services.
This commit is contained in:
parent
97bae3e7b2
commit
9194e47e76
3 changed files with 29 additions and 2 deletions
16
50x.html
Normal file
16
50x.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<html>
|
||||
<body>
|
||||
|
||||
<h1>Error!</h1>
|
||||
|
||||
<p>nginx could not find WROLPi! Are your services running?</p>
|
||||
|
||||
<p><b>sudo systemctl status wrolpi-app</b></p>
|
||||
<p><b>sudo systemctl status wrolpi-api</b></p>
|
||||
|
||||
<p>If either of those services are not running, start it:</p>
|
||||
|
||||
<p><b>sudo systemctl start wrolpi-app</b></p>
|
||||
<p><b>sudo systemctl start wrolpi-api</b></p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -89,8 +89,12 @@ sudo -u postgres psql -c '\l' | grep wrolpi || (
|
|||
|
||||
# Install the WROLPi nginx config over the default nginx config.
|
||||
cp /opt/wrolpi/nginx.conf /etc/nginx/nginx.conf
|
||||
cp /opt/wrolpi/50x.html /var/www/50x.html
|
||||
/usr/sbin/nginx -s reload
|
||||
|
||||
# Create the media directory. This should be mounted by the maintainer.
|
||||
[ -d /media/wrolpi ] || mkdir /media/wrolpi
|
||||
|
||||
# Create the WROLPi user
|
||||
grep wrolpi /etc/passwd || useradd -d /opt/wrolpi wrolpi -s "$(command -v bash)"
|
||||
chown -R wrolpi:wrolpi /opt/wrolpi
|
||||
|
|
@ -121,6 +125,8 @@ echo "
|
|||
|
||||
WROLPi has successfully been installed!
|
||||
|
||||
Mount your external hard drive to /media/wrolpi if you have one.
|
||||
|
||||
Start the WROLPi services using:
|
||||
|
||||
# sudo systemctl start wrolpi.target
|
||||
|
|
|
|||
|
|
@ -12,9 +12,14 @@ http {
|
|||
charset utf-8;
|
||||
include mime.types;
|
||||
|
||||
error_page 502 /error/50x.html;
|
||||
error_page 503 /error/50x.html;
|
||||
error_page 504 /error/50x.html;
|
||||
|
||||
server {
|
||||
location /favicon.ico {
|
||||
alias /opt/wrolpi/icon.ico;
|
||||
location ^~ /error/ {
|
||||
internal;
|
||||
alias /var/www/;
|
||||
}
|
||||
|
||||
location /apple-touch-icon.png {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue