You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

When the VM is prepared for ACP and all the required packages are installed, extract the latest version of ACP in your Apache2 DocumentRoot folder. Let's assume that your ACP Instance version equals to 1.0.3 and it should be located in /var/www/html/acp-1.0.3.

# cd /var/www/html/acp-1.0.3/tools/install/
# php install.php


You will be prompted to enter valid credentials for the database and other data for the ACP Configuration.


# php install.php
Enter web-username. Usually equals to www-data: www-data
Enter Secure directory location: /var/www/acp-1.0.3/
Mod rewrite is required for the purposes of ACP. Do you want to activate it [y/n]: y
Module rewrite already enabled
Do you want to install or update the composer dependencies [y/n]: y

Do you want to configure the database [y/n]: y
Enter database username: root
Enter database password: password
Enter database host or leave empty for localhost: 127.0.0.1
Enter database name: acp_1_0_3
Create a new database? [y/n]: y
We are going to create a new database.
Importing the database...
Do you want to generate config file? [y/n]: y
Enter the relative URL path of your instance or leave empty for '/': /acp-1.0.3/
Changing the acp ownsership
Creating new user
Installation has completed.
******** Please manually run sh ./generateKey.sh 'www-data' '/var/www/acp-1.0.3/' 'acp_1_0_3'

# sh ./generateKey.sh 'www-data' '/var/www/acp-1.0.3/' 'acp_1_0_3'


ACP and V8JS Support

If you want to enable the V8JS Support in ACP go to doc/Docker.
# cd /var/www/acp-1.0.3/doc/Docker
# sudo ./build_v8js.php

The script will download the necessary packages then will build and run a docker container which have php-v8js enabled.

The last thing that must be done is few lines of code inside your Apache2 vhost configuration:

﹤VirtualHost *:443﹥
### ACP: V8JS PROXY RULES BELLOW
   ProxyPassMatch "^/acp-(.*)/manage.php(.*)$" fcgi://127.0.0.1:9000/var/www/acp-$1/public_html/manage.php$2
   ProxyPassMatch "^/acp-(.*)/form.php(.*)$" fcgi://127.0.0.1:9000/var/www/acp-$1/public_html/form.php$2
   ProxyPassMatch "^/acp-(.*)/(.*\.php(/.*)?)$" fcgi://127.0.0.1:9000/var/www/acp-$1/$2$3
   SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

# sudo a2enmod proxy proxy_fcgi proxy_http rewrite
# sudo systemctl apache2 restart

Finally php-fcgi will be run inside docker container and it will listen on localhost:9000. All the inbound requests to apache2 for path which start with "/acp-*" will be redirected to the docker container.

  • No labels