INSTALL updates...

Fix the socket unit so that it remains running when the service is
stopped.  Add note about robots.txt and http2 in lighttpd.
This commit is contained in:
barnold 2022-10-20 21:26:02 +01:00
parent 7a206fc4f6
commit ab80ea5671
1 changed files with 14 additions and 7 deletions

21
INSTALL
View File

@ -53,10 +53,10 @@ Add /opt/pgc-www/local-override.yml containing e.g.
email-address: webmaster@example.net?Subject=Love your site!
email-name: webmaster@example.net
Likewise, you can place your own favicon.ico into public/.
After you restart the app, your address should appear on the 'about' page
and your favicon should appear instead of Mojolicious's.
After you restart the app, your address should appear on the 'about'
page. You can likewise place your own favicon.ico and robots.txt into
public/. Entries for these are present in the supplied .gitignore so
will be safe on updates.
5. Configure systemd to run the app under fastcgi, via socket activation.
@ -65,7 +65,6 @@ Suggested unit files follow, to go into /etc/systemd/system.
= pgc.socket ================================
[Unit]
Description = PG Catalog socket
PartOf = pgc.service
[Socket]
Accept = false
@ -132,12 +131,12 @@ Run
# systemctl daemon-reload
# systemctl start pgc.socket
You can apply resource limits by running
# systemctl set-property pgc.socket \
IPAddressAllow=localhost IPAddressDeny=any
# systemctl set-property pgc.service \
CPUQuota=50% CPUWeight=50 MemoryHigh=128M MemoryMax=256M
@ -151,5 +150,13 @@ Enable the service to start on boot.
I use lighttpd and followed the guidance in
<https://github.com/mojolicious/mojo/wiki/Deploying-on-Lighttpd-with-FastCGI>.
However, I disabled HTTP2 with
server.feature-flags = ("server.h2proto" => "disable")
because of sporadic trouble when using Firefox. Sometimes FF
apparently fails to send the correct GET to follow a link, instead
sending only a PRI. Possibly an instance of
<https://redmine.lighttpd.net/boards/2/topics/10682>.
Comments and questions are welcome at <barnold@tilde.club>.