This version is outdated. You should upgrade your project to Mako 11.0!
Getting started
Controllers
Databases
Command line
Packages
Learn more
Installation
Requirements
- PHP 5.3.7 or higher
- mbstring
- PDO
Mako has been tested on Apache, Cherokee, lighttpd and Nginx.
Setup
Installing Mako is easy and can be with one single command thanks to composer:
composer create-project mako/app:3.* <project name>
Remember to make the
app/storage/*
directories writable.
Mako can now be updated using the following command:
composer update
Server configurations
Apache
Basic Apache configuration for a Mako application:
<VirtualHost *:80>
DocumentRoot /srv/www/mako/htdocs
<Directory /srv/www/mako/htdocs>
Options -Indexes FollowSymLinks -MultiViews
AllowOverride All
Order allow,deny
allow from all
# URL rewrite
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</Directory>
LogLevel warn
ErrorLog /srv/www/mako/logs/error.log
CustomLog /srv/www/mako/logs/access.log combined
</VirtualHost>
Nginx
Basic Nginx configuration for a Mako application:
server
{
listen 80;
access_log /srv/www/mako/logs/access.log;
error_log /srv/www/mako/logs/error.log;
root /srv/www/mako/htdocs;
index index.php;
# Prevents access to the app and libraries directories
location ~* ^/(app|libraries)
{
return 403;
}
# "URL rewrite"
location /
{
try_files $uri $uri/ /index.php?$query_string;
}
# Pass URIs ending in .php to the PHP interpreter
location ~* \.php$
{
try_files $uri =404;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}