Skip to content

Installation

Bogdan edited this page Oct 31, 2017 · 6 revisions

Configuring the Web Server

If you are poorly versed in setting up a web server and do not know which one to choose, we recommend using Apache, because of the simpler configuration.

Apache

All necessary configuration of the web server is in the file public/.htaccess.

The only thing you need to do manually is to install Document root in the public/ directory.

Nginx

An example of a site configuration is shown below.

server {
    listen 80 default_server;
    listen [::]: 80 default_server;

    root /var/www/html/public;

    index index.php index.html;

    server_name _;

    location / {
        try_files $ uri $ uri / /index.php?$query_string;
    }

    location ~\.php $ {
        include snippets / fastcgi-php.conf;

        fastcgi_pass unix: /run/php/php7.1-fpm.sock;
    }

    fastcgi_buffer_size 92k;
    fastcgi_buffers 4 92k;
}

Installing the system

  1. Read the system requirements and make sure that all necessary components are installed on the server.

  2. Install the composer dependency manager (https://getcomposer.org/).

  3. Download the archive from https://github.com/D3lph1/L-shop and unpack it to any convenient location on the server.

  4. Dump the tables from the database / dump folder. Import the file into the database. Depending on which file you choose, this will be the original content.

  5. Rename the .env.example file to .env

  6. Open the .env file and configure:

    • APP_NAME - The name of the application.

    • APP_URL - Site address

    • APP_LOCALE - Site language ("en" or "ru")

    • DB_HOST - The address of the database server.

    • DB_PORT - Database server port.

    • DB_USERNAME - Database user name.

    • DB_PASSWORD - The password of the database user.

    • DB_PREFIX - Table prefix. If you do not know what it is, leave it as it is.

    • MAIL_HOST - The address of the mail server *.

    • MAIL_PORT - Postal Serial Port.

    • MAIL_USERNAME - Username of the mail user.

    • MAIL_PASSWORD - Mail user password.

    • MAIL_ENCRYPTION - Connection encryption algorithm (Available: ssl, tls. The second is preferable).

    • MAIL_FROM_ADDRESS - The address of the author of letters.

    • MAIL_FROM_NAME - The name of the author of the letters.

  7. Go to the directory with the unpacked L-Shop and run the command composer install. Wait until the completion of the installation of dependencies (files are many and they weigh a lot (For the site), so downloading can be long).

I recommend using gmail as a service. I did not have any problems with it (The only thing to do is to install the checkbox on this page: https://myaccount.google.com/lesssecureapps).

  1. Create a new user. You can do it with:
    "php artisan user: create username email@gmail.com password123 --activate --admin"
        * username is the username,     * email@gmail.com - email of the user,     * password123 - password.
    In the l-shop an administrator is already registered, you can enter under his account (User name: admin password: admin). Do not forget to delete it or change the data.
  2. Go to Administration>Management>Security and execute what is written there under "Key Generator".
  3. Go to Administration>Management>Security and specify the RECAPTCHA keys.
  4. Go to Administration>Management>Payments and specify the data from the ROBOKASSA service.
  5. Go to Administration>Management>Optimize and update the cache of routes and configs. This should have a positive impact on application performance.

Configuring Payment Aggregators

You will need to specify in the settings of payment aggregators information for interaction with the L-Shop.

Of course, you need to replace example.com with the domain of your application.