Nginx Server Instructions

You are here:
< All Topics

Important: These instructions do not apply if you are using standard Apache-based web hosting (i.e. Cpanel, Plesk, Direct Admin, LAMP, etc).

The following instructions will guide you on how to install Grow CRM on a server that is running Nginx.


Edit Virtual Host Config File

You will need to edit the nginx config file for your website. This is typically found in the /etc/nginx/conf.d directory. You add the following code, which will direct all requests on your website to index.php

For effecting security of your website, you must add these directives in the order they are listed below.

#VERY IMPORTANT: protect the applications core directory
location ~ /application/* {
deny all;
}

#direct all urls to index.php
location / {
try_files $uri $uri/ /index.php?$query_string;
}

You must then restart your Nginx webserver

systemctl restart nginx

Set Folder Permissions

The following folders must be writable

If you do not set writable permissions as show below, you will get a 504 Gateway Time Out error.

 

You can set writable permissions via FTP or via SSH

Depending on how your web server is setup, you can try setting permissions as follows. Try the lowest level first, if it does not work, try the next permission level.

  • 0755
  • 0770
  • 0777

THESE FOLDER MUST BE WRIATBLE

/updates /storage /storage/avatars /storage/logos /storage/logos/clients /storage/logos/app /sorage/files /storage/temp /application/storage /application/storage/cache
/application/storage/cache/data /application/storage/debugbar /application/storage/logs /application/storage/temp /application/storage/app /application/storage/app/public /application/storage/framework /application/storage/framework/cache
/application/storage/framework/cache/data /application/storage/framework/sessions /application/storage/framework/testing /application/storage/framework/views /application/bootstrap/cache

THESE FILES MUST BE WRIATBLE
/application/.env

You can also get more information on Laravel and Nginx here.

You will now be able to continue with the rest of the Installation Instructions

Table of Contents