Installation

Requirements


MogulMVC has very few requirements and will work on most shared hosted environments.

Web Server

Any web server that supports PHP. MogulMVC has been tested on Apache, NGINX and HipHop for PHP. Apache is prefered.
MogulMVC also requires a way to rewrite the path. In Apache this is provided by mod_rewrite.

PHP Version

MogulMVC requires PHP 5.3.

Recommendations

Apache 2 running on a Linux system.

Apache mod_rewrite extension.

PHP 5.3

How to Install


To install and start using MogulMVC you need to first get the source code. To download the source code click the "Download" button on the home page.

After you get the source code you will notice there are 2 directories in the root directory as well as an .bowerrc, .htaccess, bower.json, and composer.json file. The two directories are backend and frontend. We will discuss the .htaccess file is configured to make Apache work with MogulMVC's organizational system. The .bowerrc and bower.json files are for frontend Bower package managment. The composer.json file is for backend Composer package managment.

/backend/
/frontend/
/.bowerrc
/.htaccess
/bower.json
/composer.json

Move the backend and frontend directories onto your Apache server and point your document root to the frontend directory. Keeping the backend directory out of the document root keeps your PHP code safe as it is never in a public facing server.

/backend/
/frontend/ ← This becomes the document root
/.bowerrc
/.htaccess
/bower.json
/composer.json

So, what does the .htaccess file do? To understand that I first have to tell you that you can also point the document root to the directory containing both the backend and frontend directories. This would make the backend and frontend directories accessible to the outside world and is generally a bad practice. If you do this the .htaccess file there is to redirect the incoming signal from Apache to the frontend directory which thus runs the application.