Installation

Shared hosting

  1. Create a new mysql database and mysql user with full permissions to that database.
  2. Extract archive you downloaded from the codecanyon.
  3. Upload the contents of application folder to your hosting. You can do this via FTP or hosting administration panel.
  4. Set chmod 0777 for directory var and public.
  5. Point your domain to the {your_application_dir}/public.
  6. Go to http://yourdomain.com/install and proceed with the installation.
  7. Done ;)

Dedicated machine (Ubuntu, PHP 7.3, Mysql 8.0, Nginx)

Step 1. Base preparation

sudo apt update

Step 2. Install PHP 7.3 FPM and required extensions

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.3-fpm
sudo apt install php7.3-common php7.3-mysql php7.3-xml php7.3-curl php7.3-gd php7.3-cli php7.3-mbstring php7.3-opcache php7.3-zip php7.3-intl php7.3-http
sudo service php7.3-fpm start

Step 3. Install and configure Mysql.

Warning

Remember your mysql root user password, you are going to need it later.

sudo apt update
sudo apt install mysql-server
sudo service mysql start
sudo mysql_secure_installation

Step 4. Create new mysql user and database

Note

Database user credentials and database name are just an example. You can use your own.

In order to enter the mysql, use the command below. Raplace YOUR_ROOT_PASSWORD with your valid root password.

sudo mysql -u root -pYOUR_ROOT_PASSWORD

To create database, type the following command:

CREATE DATABASE bitfetcher;

and to create the user, this one:

CREATE USER 'bitfetcher'@'localhost' IDENTIFIED BY 'bitfetcher-pass';
GRANT ALL PRIVILEGES ON bitfetcher.* TO 'bitfetcher'@'localhost' IDENTIFIED BY 'bitfetcher-pass';
FLUSH PRIVILEGES;

Step 5. Prepare application code

Note

Directory /var/www/bitfetcher is just an example. You can put your application code anywhere you want.

Create application directory

sudo mkdir -p /var/www/bitfetcher && chmod -R 0755 /var/www/bitfetcher 

Extract the archive with the application and copy application folder contents to /var/www/bitfetcher.

Step 6. Install and configure nginx

sudo apt update
sudo apt install nginx
sudo ufw allow 'Nginx HTTP'
sudo service nginx start

Create new nginx config file at /etc/nginx/sites-available/bitfetcher and paste the code below.

server {
    listen 80;
    listen [::]:80;
    root /var/www/bitfetcher/public; # Set path to the bitfetcher application public directory
    server_name localhost;           # Set your domain name here.

    location / {
        try_files $uri /index.php$is_args$args;
    }

    location ~ ^/index\.php(/|$) {
        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $document_root;
        internal;
    }

    location ~ \.php$ {
        return 404;
    }

    error_log /var/log/nginx/bitfetcher_error.log;
    access_log /var/log/nginx/bitfetcher_access.log;
}

and enable the site with the following commands

sudo ln -s /etc/nginx/sites-available/bitfetcher /etc/nginx/sites-enabled/
sudo service nginx restart

Step 6. Application installation

Go to the http://{your_domain}/install and proceed with the installation.

Docker (Development only)

Warning

Use it only when you are know what are you doing.

  • Install docker and docker-compose.
  • Go to application/ directory and run docker-compose up
  • Open http://localhost in the browser.
  • Done ;)