How to install Monstra CMS with Nginx on CentOS 6.9

To install Monstra CMS with Nginx on CentOS 6.9

In our previous post we have seen about the installation of Monstra CMS on CentOS 6.9. For watching the mentioned tutorial, click on the https://www.linuxhelp.com/how-to-install-monstra-cms-on-centos-6-9/. Now we are going to see about the installation procedure of Monstra CMS with Nginx on CentOS 6.9. Monstra is a modern and fast Content Management System (CMS) written in PHP. It has a tons of useful plugins and themes, and it is constantly developed by its developers. With its speed and simplicity, Monstra is a great publishing tool for personal and small-business websites.

Pre-Requisite

Before starting the installation procedure, check whether the target machine is installed with LEMP environment for the Monstra CMS to work in.

Installation procedure

To start with the installation procedure, download the Monstra CMS package via terminal by executing the wget command followed by the download link.

[root@linuxhelp Desktop]# wget https://bitbucket.org/Awilum/monstra/downloads/monstra-3.0.4.zip
--2017-09-28 03:56:02--  https://bitbucket.org/Awilum/monstra/downloads/monstra-3.0.4.zip
Resolving bitbucket.org... 104.192.143.3, 104.192.143.1, 104.192.143.2, ...
Connecting to bitbucket.org|104.192.143.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
.
.
100%[======================================> ] 1,739,269   22.3K/s   in 60s     

2017-09-28 03:57:04 (28.5 KB/s) - “ monstra-3.0.4.zip”  saved [1739269/1739269]

Extract the downloaded file by running the unzip command.

[root@linuxhelp Desktop]# unzip monstra-3.0.4.zip
Archive:  monstra-3.0.4.zip
   creating: monstra-3.0.4/
  inflating: monstra-3.0.4/sitemap.xml  
  inflating: monstra-3.0.4/rss.php   
  inflating: monstra-3.0.4/robots.txt  
  inflating: monstra-3.0.4/install.php  
.
.
.
.
.
inflating: monstra-3.0.4/libraries/Gelato/ErrorHandler/Resources/Views/Errors/production.php  
inflating: monstra-3.0.4/libraries/Gelato/ErrorHandler/Resources/Views/Errors/exception.php  

Rename the extracted file by executing the following command.

[root@linuxhelp Desktop]# mv monstra-3.0.4 monstra

Move the monstra file to HTML location.

[root@linuxhelp Desktop]# mv monstra /usr/share/nginx/html/

Change the ownership and permission of file in HTML location.

[root@linuxhelp Desktop]# chown -R nginx.nginx /usr/share/nginx/html/monstra
[root@linuxhelp Desktop]#  chmod -R 777 /usr/share/nginx/html/monstra

Edit the php-fpm configuration file using vim editor and enter the following content in the file. Save and exit the file.

[root@linuxhelp Desktop]# vim /etc/php-fpm.d/www.conf
listen = /var/run/php-fpm/php-fpm.sock

Configure the Nginx configuration file using vim editor and enter the contents in the file. Save and exit the file.

[root@linuxhelp Desktop]# vim /etc/nginx/conf.d/default.conf
index index.php 
location / {
            try_files $uri $uri/ /index.php?$args 
}
location ~ .php$ {
include /etc/nginx/fastcgi.conf 
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock 
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name 
}

Change the ownership of PHP directory by running the following command.

[root@linuxhelp Desktop]# chown -R nginx.nginx /var/lib/php

Change the ownership of php-fpm service by executing the following commands.

[root@linuxhelp Desktop]# chown nginx:nginx /var/run/php-fpm/php-fpm.sock

Restart the php-fpm service.

[root@linuxhelp Desktop]# service php-fpm restart
Stopping php-fpm:                                          [  OK  ]
Starting php-fpm:                                          [  OK  ]

Restart the Nginx service.

[root@linuxhelp Desktop]# service nginx restart
Stopping nginx:                                            [  OK  ]
Starting nginx:                                            [  OK  ]

Switch over to the browser and enter the URL as http://machineip/monstra. The installation setup opens on the screen. It shows the system check before starting the installation process and click continue.

Next enter the site details such as site name, site URL, username and password and save the changes.

Enter the admin details and click install option.

The site' s home page appears on the screen.

Enter the required admin credentials and login to the site.

The admin page of Monstra CMS appears on the screen.

Next to open admin dashboard click logged in option in the home page.

The admin dashboard is shown on the screen.

Thus concludes the installation procedure of Monstra CMS with Nginx on CentOS 6.9

FAQ
Q
what is the system requirements?
A
At least 5 MB of webspace
PHP 4.3.0 or higher (recommended PHP 5.2)
MySQL 4.1 or higher
JavaScript enabled browser
Q
Nginx + php5-fpm = “File not found”.Can anyone shed any light onto what could be happening?
A
ou should have a location section to handle PHP requests configured similarly to this: location ~ \.php$ { try_files $uri =404; fastcgi_pass 127.0.0.1:9000;
Q
Best way to set up permissions with nginx + php-fpm on shared hosting?
A
Note that if some directories need to be writable by the web server, you can set those up on a case by case basis by changing both instances of the permissions rx to rwx. For example: setfac
Q
Is the PHP option 'cgi.fix_pathinfo' really dangerous with Nginx + PHP-FPM?
A
php-fpm's www.conf file (maybe /etc/php-fpm.d/www.conf, depends on your system). Make sure you have this: security.limit_extensions = .php
Q
nginx + PHP-FPM = “permission denied” error 13 in nginx log; configuration mistake?
A
make sure /home/dev has correct permissions chmod +x /home/dev