This repository was archived by the owner on Dec 8, 2022. It is now read-only.
forked from mako-framework/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started: Installation
Marco Montalbano edited this page Jul 31, 2017
·
1 revision
- PHP 5.3.7 or higher
- PHP 7
- mbstring
- PDO
Mako has been tested on Apache, Cherokee, lighttpd and Nginx.
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
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>
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;
}
}
- Getting started: Installation
- Getting started: Configuration
- Getting started: Error handling
- Getting started: Constants
- Getting started: Coding standards
- Controllers: Controllers
- Controllers: Request
- Controllers: Response
- Databases: Basics
- Databases: Query builder
- Databases: Orm
- Databases: Migrations
- Command line: Basics
- Command line: Custom tasks
- Packages: Basics
- Packages: Composer packages
- Learn more: Array helper
- Learn more: Asset manager
- Learn more: Autoloading
- Learn more: Caching
- Learn more: Cookies
- Learn more: Events
- Learn more: File helper
- Learn more: Html helper
- Learn more: Internationalization
- Learn more: Logging
- Learn more: Number helper
- Learn more: Pagination
- Learn more: Redis client
- Learn more: Rest client
- Learn more: Security helpers
- Learn more: Sessions
- Learn more: String helper
- Learn more: Url helper
- Learn more: Uuid helper
- Learn more: Validation
- Learn more: Views