A minimal web server starter pack with:
- my favorite .htaccess config for php routing
- basic directory structure and php entry points
- a top level error handler with developer friendly error response
- basic error page
- basic dark mode css
- minimal docker support
All requests for php files, directories, or sensitive files are redirected to the public/index.php.
An additional .htaccess and index.php outside the public folder allow the server to run form either folder with the same behaviour.
Requires php7 or higher and composer.
Run composer init
to create a composer.json.
Run the web server with docker ./docker/start-server.sh
.
Do what you want with this code.
It comes as is with no warranty and the author accepts no liability in any way for how it is used.
You do not have to keep a copy this licence with the code, once you delete it the code is yours and I expect no credit.