Un sitio web auto-alojada en apache y grav
From Wiki-Fou
relationada con el project Una pagina web auto alojada de bajo consumo
Apache
sudo apt-get install htop nload iotop mcrypt curl unzip rsync git sudo apt install apache2 php sudo a2ensite webcalafou.conf sudo chown -R www-data: webcalafou/ sudo apt install php-curl php-gd php-mbstring php-intl php-xml php-zip sudo a2enmod rewrite sudo a2enmod proxy proxy_fcgi rewrite sudo a2enmod proxy_fcgi setenvif sudo a2enconf php8.4-fpm
Para optimisar el apache https://blog.pascal-mietlicki.fr/diagnostic-et-optimisation-dapache/
Grav
- Install grav https://learn.getgrav.org/17/basics/installation
cd /var/www/webcalafou wget https://getgrav.org/download/core/grav/latest unzip latest rm latest chown -R www-data: webcalafou/ apt install php-curl php-gd php-mbstring php-intl php-xml php-zip php-yaml a2enmod rewrite nano apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
systemctl restart apache2
- Page 404 https://learn.getgrav.org/17/troubleshooting/page-not-found
- Cache https://learn.getgrav.org/17/advanced/performance-and-caching
- Log https://learn.getgrav.org/17/advanced/debugging
- Permission https://learn.getgrav.org/17/troubleshooting/permissions
- manegar los plugins in CLI como https://github.com/Flamenco/grav-admin-media-actions
sudo -u www-data bin/gpm install admin-media-move
- Cambiar la imagen del header (hero) https://getgrav.org/premium/typhoon/docs?target=_blank#hero-defaults
Script a exec a donde ha y el grav
#!/bin/sh
chown -R www-data:www-data .
find . -type f -exec chmod 664 {} \;
find ./bin -type f -exec chmod 775 {} \;
find . -type d -exec chmod 775 {} \;
find . -type d -exec chmod +s {} \;