💾 Archived View for glasgow.social › gemini-php captured on 2021-11-30 at 20:18:30. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
Gemini-PHP is a Gemini server written in PHP by @neil@glasgow.social.
It's designed more for teaching than practical use. That's said - it's very simple to get up and running and we're hosting this page on it - it seems to be performing well.
If you have any questions or want to get in touch, you can join our community on Matrix at #gemini-php:glasgow.social
git clone https://coding.openguide.co.uk/git/gemini-php/
cd gemini-php openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365
cp cert.pem certs/combined.pem cat key.pem >> certs/combined.pem
cp config.php.sample config.php
php server.php
Our favourite Gemini client so far is Lagrange
mkdir hosts/glasgow.social mkdir hosts/projects.glasgow.social
To set up the server as a service, create the following file in /etc/systemd/system/gemini-php.service
[Unit] Description=Gemini-PHP Service [Service] User=gemini Type=simple TimeoutSec=0 WorkingDirectory=/home/gemini/gemini-php/ PIDFile=/var/run/gemini-php.pid ExecStart=/usr/bin/php -f /home/gemini/gemini-php/server.php KillMode=process Restart=on-failure RestartSec=42s [Install] WantedBy=default.target
Note, customise the above to the user you are running gemini-php as (we recommend creating a new user account for this to keep it relatively isolated) as well as the path to the script.
Enable the script with systemctl
sudo systemctl enable gemini-php sudo systemctl start gemini-php systemctl status gemini-php