Site Tools


Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
projectinsanity:server_setup_experimental

http-d9.pi

pi_wordpress

Neuer zentraler http-Server, auf dem Caddy, Kryops, Baikal, Wordpress und TS3-Webfrontend in systemd-nspawn containern läuft.

useradd pi_ts3 -u -g
useradd -m -u $((4325376+33)) pi_wordpress                                                                                                   

Folgendes Skript erstellt ein ZFS-Volume mit dem angegebenen Namen. Führt danach ein deboostrap aus und installiert die in $name/vars angegebenen Packete. Die nspawn-Konfigurationsdatei, die Informationen enthält zu UserID- und Datei-Mapping des Containers, wird nach /etc/systemd/nspawn gesymlinkt.

/root/nspawn/build.sh pi_wordpress
/root/nspawn/build.sh pi_ts3
/etc/systemd/nspawn/pi_wordpress.nspawn
[Exec]
PrivateUsers=4325376

[Files]
PrivateUsersChown=true
BindReadOnly=/home/pi_wordpress/nginx_vhost:/etc/nginx/sites-available/default
Bind=/home/pi_wordpress/wordpress/:/var/www/html
/etc/systemd/nspawn/pi_ts3.nspawn
[Exec]
PrivateUsers=2097152

[Files]
PrivateUsersChown=true
BindReadOnly=/home/pi_ts3/nginx_vhost:/etc/nginx/sites-available/default
Bind=/home/pi_ts3/www/:/var/www/html
/etc/systemd/nspawn/caddy.nspawn
[Exec]
PrivateUsers=4390912

[Files]
PrivateUsersChown=true
Bind=/home/caddy/ssl:/etc/ssl/caddy
Bind=/home/caddy/logs:/var/log/caddy
BindReadOnly=/root/nspawn/caddy/Caddyfile:/etc/caddy/Caddyfile
BindReadOnly=/root/nspawn/caddy/caddy.sh:/usr/local/bin/caddy

[Network]
VirtualEthernet=false
Private=false
systemctl start systemd-nspawn@pi_ts3
systemctl enable systemd-nspawn@pi_ts3
systemctl start systemd-nspawn@pi_wordpress
systemctl enable systemd-nspawn@pi_wordpress
systemctl start systemd-nspawn@caddy
systemctl enable systemd-nspawn@caddy

Todo: private-network oder firewall?

caddy

vim /root/nspawn/caddy/Caddyfile
systemctl restart systemd-nspawn@caddy

wordpress

SSL für administrativen Bereich erzwingen:

/var/www/project-insanity.org/wp-config.php
define(‘FORCE_SSL_ADMIN’, true);
/* That’s all, stop editing! Happy blogging. */

Plugins und Wordpress ohne FTP-Zugang direkt aktualisieren:

/var/www/project-insanity.org/wp-config.php
define('FS_METHOD', 'direct');
/* That’s all, stop editing! Happy blogging. */

Möglicherweise müssen noch die Schreibrechte für den wp-content-Ordner angepasst werden.

plugins

  • WP Statistics
  • Crayon Syntax Highlighter
  • Gallery Carousel Without JetPack
projectinsanity/server_setup_experimental.txt · Last modified: 2021/10/31 10:42 by 127.0.0.1