====== Gemini-PHP ====== A [[https://gemini.circumlunar.space/|Gemini]] server written in PHP. This code is designed to be simple to understand (we'll use it in our socket programming workshops). If you have any questions or want to get in touch, you can join our community on Matrix at **#gemini-php:glasgow.social** Our offical Gemini page is **[[gemini://glasgow.social/gemini-php]]** ===== Download ===== You can [[https://coding.openguide.co.uk/gitweb/?p=gemini-php;a=summary|view the source]], download the [[https://coding.openguide.co.uk/gitweb/?p=gemini-php;a=snapshot;h=HEAD;sf=tgz|latest tarball]] or git clone it via: git clone https://coding.openguide.co.uk/git/gemini-php/ ===== Getting Started ===== * Clone the repository git clone https://coding.openguide.co.uk/git/gemini-php/ * Enter the project directory and create a certificate for your server (a self signed certificate is fine, in fact it's encouraged!) cd gemini-php openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 * Combine your private key with the certificate and put it in the ''certs'' directory cp cert.pem certs/combined.pem cat key.pem >> certs/combined.pem * Create a config file cp config.php.sample config.php * Then edit it with the location of your new certificate (''certs/combined.pem'') - most other options are optional * Start your server with: php server.php * You should be able to visit your new server in any Gemini client (remember to open your firewall if needed [port 1965]). * The default file it serves (like an index.html) is at ''hosts/default/index.gemini'' * We recommend [[https://github.com/skyjake/lagrange|Lagrange]] if you haven't settled on a Gemini client yet.