Slimple
Simple Slim PHP starter repo.
PHP built-in server
$ composer start
… and visit http://0.0.0.0:8080/.
This will not load the .htaccess
file!
Apache dev option
To test .htaccess
, setup an Apache vhost:
<VirtualHost *:80>
DocumentRoot "/root/path/to/site.local/public"
ServerName site.local.local
ServerAlias www.site.local.local
ErrorLog "logs/site.local.local-error.log"
CustomLog "logs/site.local.local-access.log" combined
#DirectoryIndex index.html
<Directory "/root/path/to/site.local/public">
AddDefaultCharset utf-8
IndexOptions +FancyIndexing NameWidth=*
Options -Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
Add 127.0.0.1 site.local.local
to your hosts file and restart your local dev Apache.
Use this approach if you want to test the rules found in the .htaccess
. Once that's solid, feel free to use the php built-in server.
Install Composer dependencies:
Install Composer:
$ curl -s http://getcomposer.org/installer | php
Get the composer-installable code:
$ php composer.phar install
If/when needed, update Composer dependencies using:
$ php composer.phar update
WARNING: You should never run composer update
on the production machine!
[after] deploy[ing] your updated
composer.lock
, [you should] then re-runcomposer install
. You should never runcomposer update
in production. If however you deploy a newcomposer.lock
with new dependencies and/or versions (after having runcomposer update
in dev) [you can] then runcomposer install
[and] Composer will update and install your new dependencies [onto the production machine’s deployment].
– “composer update” vs “composer install”