-
Notifications
You must be signed in to change notification settings - Fork 2
Installation_Instruction
Chris Churas edited this page Sep 10, 2018
·
7 revisions
Please read the REST API installation instructions first.
-
cd $YOUR_GIT_FOLDER
-
git clone https://github.com/slash-segmentation/CIL_PHP_Website.git
-
cd /var/www
-
rm -rf html
-
mkdir html
-
mv $YOUR_GIT_FOLDER/CIL_PHP_Website/CIL/* ./html
-
Create an external configuration file, cil_config.json
{
"cil_auth":"username:password",
"base_url_dev":"http://localhost",
"base_url_stage":"http://stage_host_name",
"base_url_prod":"http://prod_host_name",
"service_api_host_dev":"http://localhost:8080",
"service_api_host_stage":"https://stage_api_host_name",
"service_api_host_prod":"https://prod_api_host_name",
"cil_data_host":"https://data_host_name",
"elasticsearchHost_dev":"http://dev_es_host:9200",
"elasticsearchHost_stage":"http://stage_es_host:9200",
"elasticsearchHost_prod":"http://prod_es_host:9200"
}
- Edit /var/www/html/application/config/config.php
$cil_config_file = "C:/data/cil_config.json";
/****************************Base URL************************************************/
$config['base_url'] = $cil_config_json->base_url_dev; //Development
//$config['base_url'] = $cil_config_json->base_url_stage; //Staging
//$config['base_url'] = $cil_config_json->base_url_prod; //Production
/**************************************************************************************/
/****************************Service API************************************************/
//$service_api_host = $cil_config_json->service_api_host_dev; //Development
$service_api_host = $cil_config_json->service_api_host_stage; //Staging
//$service_api_host = $cil_config_json->service_api_host_prod; //Production
/****************************************************************************************/
/****************************Elasticsearch server************************************************/
$config['elasticsearchHost'] = $cil_config_json->elasticsearchHost_stage; //Staging
//$config['elasticsearchHost'] = $cil_config_json->elasticsearchHost_prod; //Production
/*************************************************************************************************
- Enable the mod_rewrite module (On Centos 7 it should be on by default, but here is an article on how to check: https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite-for-apache-on-centos-7)
Put a directory block in your httpd.conf:
<Directory "C:\Users\Willy\Documents\apache\Apache24\CIL_PHP_Website\CIL_PHP_Website\CIL">
DirectoryIndex index.html
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride None
#AllowOverride All
#
# Controls who can get stuff from this server.
#
Require all granted
RedirectMatch ^/$ /home
#
# Willy: Rewrite for escaping index.php
#
RewriteEngine On
RewriteBase /
# Protect application and system files from being viewed when the index.php is missing
RewriteCond $1 ^(application|system|private|logs)
# Rewrite to index.php/access_denied/URL
RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]
# Allow these directories and files to be displayed directly:
RewriteCond $1 ^(index\.php|index\.html|robots\.txt|favicon\.ico|public|assets|css|js|resources|Knowledge_Space_files|img|static|pic|pix|swf|assets|videos|template|old_cil|fonts|display_images)
# No rewriting
RewriteRule ^(.*)$ - [PT,L]
# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]
</Directory>
service httpd restart
Go to http://localhost or http://YOUR_HOST_NAME