dev-master
9999999-devSample Markdown CMS application
MIT
The Requires
The Development Requires
by Matheus Correa
zf2 cms markdown
Wallogit.com
2017 © Pedro Peláez
Sample Markdown CMS application
This is a simple, Sample Markdown CMS using the ZF2 MVC layer and module systems., (*1)
The easiest way to create a new project is to use Composer. If you don't have it already installed, then please install as per the documentation., (*2)
Create your new Sample Markdown CMS project:, (*3)
composer create-project -n -sdev matheusvcorrea/sample-cms-markdown path/to/install
Connection parameters can be defined in the application configuration in config/autoload/doctrine.local.php:, (*4)
<?php
return array(
'doctrine' => array(
'connection' => array(
// default connection name
'orm_default' => array(
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
'params' => array(
'host' => 'localhost',
'port' => '3306',
'user' => 'username',
'password' => 'password',
'dbname' => 'database',
)
)
)
),
);
Import the SQL sample data located in data/sample-data.sql., (*5)
The simplest way to get started if you are using PHP 5.4 or above is to start the internal PHP cli-server in the root directory:, (*6)
php -S 0.0.0.0:8080 -t public/ public/index.php
This will start the cli-server on port 8080, and bind it to all network interfaces., (*7)
Note: The built-in CLI server is for development only., (*8)
To setup apache, setup a virtual host to point to the public/ directory of the project and you should be ready to go! It should look something like below:, (*9)
<VirtualHost *:80>
ServerName markdown.localhost
DocumentRoot /path/to/sample-markdown-cms/public
<Directory /path/to/sample-markdown-cms/public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
</Directory>
</VirtualHost>
To setup nginx, open your /path/to/nginx/nginx.conf and add an
include directive below
into http block if it does not already exist:, (*10)
http {
# ...
include sites-enabled/*.conf;
}
Create a virtual host configuration file for your project under /path/to/nginx/sites-enabled/sample-markdown-cms.localhost.conf
it should look something like below:, (*11)
server {
listen 80;
server_name markdown.localhost;
root /path/to/sample-markdown-cms/public;
location / {
index index.php;
try_files $uri $uri/ @php;
}
location @php {
# Pass the PHP requests to FastCGI server (php-fpm) on 127.0.0.1:9000
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /path/to/sample-markdown-cms/public/index.php;
include fastcgi_params;
}
}
Restart the nginx, now you should be ready to go!, (*12)
Sample Markdown CMS application
MIT
zf2 cms markdown