Skip to content

Howto PhpEmbeddedServer

Sébastien Lucas edited this page Jun 28, 2018 · 2 revisions

How to use COPS with PHP Embedded Server

For use in a small local network, you won't need a heavy webserver like nginx. The built-in webserver in php 5.4+ should be enough.

$ cd cops
$ ln -s "~/Calibre Library" library
$ cat config_local.php
<?php
    if (!isset($config))
        $config = array();
    $config['calibre_directory'] = './library/';
    $config['cops_title_default'] = "COPS";
    $config['cops_use_url_rewriting'] = "0";
$ php -S 192.168.0.3:8080

Note that storing your Calibre library inside COPS'directory is a bad idea for security so this should only be done on a safe LAN.

Thanks to progandy for the idea.