2017 © Pedro Peláez
 

library sample-cms-markdown

Sample Markdown CMS application

image

matheusvcorrea/sample-cms-markdown

Sample Markdown CMS application

  • Saturday, July 23, 2016
  • by matheusvcorrea
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Sample Markdown CMS

Introduction

This is a simple, Sample Markdown CMS using the ZF2 MVC layer and module systems., (*1)

Installation using Composer

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

Config

Doctrine Connection

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',
                )
            )
        )
    ),
);

Sample Data

Import the SQL sample data located in data/sample-data.sql., (*5)

Web server setup

PHP CLI server

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)

Apache setup

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>

Nginx setup

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)

The Versions

23/07 2016

dev-master

9999999-dev

Sample Markdown CMS application

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matheus Correa

zf2 cms markdown