Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Use cases
  • Web service
    • All use cases
    • Static website in Object Storage
    • Website on LAMP or LEMP stack
    • Fault-tolerant website with load balancing from Yandex Network Load Balancer
    • Fault-tolerant website using DNS load balancing
    • Joomla-based website with PostgreSQL
    • WordPress website
    • WordPress website on a MySQL database
    • 1C-Bitrix website
  • Online stores
    • All use cases
    • 1C-Bitrix online store
    • Opencart online store
  • Data archive
    • All use cases
    • Single-node file server
    • Configuring an SFTP server on Centos 7
    • Backup to Object Storage via Acronis Backup
    • Backup to Object Storage via CloudBerry Desktop Backup
    • Backup to Object Storage via Duplicati
    • Backup to Object Storage via Bacula
    • Digitizing archives in Yandex Vision
  • Test environment
    • All use cases
    • Testing applications with GitLab
    • Creating test VMs using GitLab CI
    • High-performance computing on preemptible VMs
  • Infrastructure management
    • All use cases
    • Getting started with Terraform
    • Uploading Terraform states to Object Storage
    • Getting started with Packer
    • VM images building automation using Jenkins
    • Continuous deployment of containerized applications using GitLab
    • Creating a cluster of 1C:Enterprise Linux servers with a Managed Service for PostgreSQL cluster
    • Creating a cluster of 1C:Enterprise Windows servers with MS SQL Server
    • Migrating to Yandex.Cloud using Hystax Acura
    • Emergency recovery in Yandex.Cloud using Hystax Acura
    • Configuring a fault-tolerant architecture in Yandex.Cloud
  • Windows in Yandex.Cloud
    • All use cases
    • Deploying Active Directory
    • Deploying Microsoft Exchange
    • Deploying Remote Desktop Services
    • Deploying an Always On availability group
    • Deploying an Always On availability group with an internal network load balancer
  • Network routing
    • All use cases
    • Routing through a NAT instance
    • Creating a VPN tunnel
    • Installing a Cisco CSR1000v virtual router
    • Installing a Mikrotik CHR virtual router
    • Creating a VPN connection using OpenVPN
  • Data visualization and analytics
    • All use cases
    • Visualizing data from a CSV file
    • Visualizing data from a ClickHouse database
    • Visualizing data from Yandex.Metrica
    • Visualizing data from Yandex.Metrica Logs API
    • Publishing a chart with a map from a CSV file to DataLens Public
    • Visualizing data from AppMetrica
    • Visualizing geodata from a CSV file
  • Internet of things
    • Use cases for the internet of things
    • Status monitoring of geographically distributed devices
    • Monitoring sensor readings and event notifications
  1. Web service
  2. 1C-Bitrix website

1C-Bitrix website

  • Before you start
    • Required paid resources
  • Create a VM in the cloud
  • Create a MySQL database cluster
  • Configure a server to work with 1C-Bitrix
  • Configure 1C-Bitrix
  • How to delete created resources

1C-Bitrix: Site Management is a web project management system from 1C-Bitrix. It lets you easily manage the structure and content of your website without knowing programming or design. 1C-Bitrix: Site Management does the technical work for you.

In this tutorial, you'll deploy and configure a website using the 1C-Bitrix information portal template. During the configuration, you'll create a VM in Yandex.Cloud, deploy the 1C-Bitrix image on it, and launch the necessary services. As a database, you'll deploy a managed MySQL database cluster and ensure its fault tolerance.

Resources used for proper operation of 1C-Bitrix:

  • A VM running Ubuntu 18.04 LTS with access to an external network and hosting 1C-Bitrix.
  • A MySQL cluster that serves as a database for the 1C-Bitrix website.

To deploy and configure 1C-Bitrix:

  1. Before you start.
  2. Create a VM in the cloud.
  3. Create a MySQL DB cluster.
  4. Configure a server to work with 1C-Bitrix.
  5. Configure 1C-Bitrix.

Before you start

Before deploying the server, you need to sign up for Yandex.Cloud and create a billing account:

  1. Go to the management console. Then log in to Yandex.Cloud or sign up if don't already have an account.
  2. On the billing page, make sure you linked a billing account, and it has the ACTIVE or TRIAL_ACTIVE status. If you don't have a billing account, create one.

If you have an active billing account, you can create or select a folder to run your VM in. Go to the Yandex.Cloud home page and select or create a folder where you want to create a VM for your server. Learn more about the resource hierarchy in Yandex.Cloud.

Required paid resources

The cost for maintaining the 1C-Bitrix server includes:

  • A fee for Yandex Compute Cloud disks and a continuously running VM (see pricing for Yandex Compute Cloud).
  • A fee for using a dynamic or static external IP address (see Yandex Virtual Private Cloud pricing).
  • A fee for using a managed database (see pricing for Managed Service for MySQL).

The current scenario uses the trial version of 1C-Bitrix with a trial period of 30 days. You can check the cost the product software versions on the 1C-Bitrix official website.

Create a VM in the cloud

To create a VM:

  1. On the Folder dashboard folder page, in the management console, click Create resource and select Virtual machine.
  2. In the Name field, enter a name for the VM, such as bitrixwebsite.
  3. Leave the default availability zone.
  4. Under Images from Cloud Marketplace, select the ** Ubuntu 18.04 LTS** image.
  5. Under Disks, select an SSD with 20 GB.
  6. Under Computing resources:
    • Choose a platform for the VM.
    • For 1C-Bitrix to run properly, specify the following configuration:
      • Platform: Intel Cascade Lake.
      • Guaranteed vCPU share: 20%.
      • vCPU: 2.
      • RAM: 4 GB.
  7. Under Network settings:
    • Select the Network and Subnet to connect the VM to. If you don't have a network or subnet, create them right on the VM creation page.
    • In the Public address field, leave the Auto value to assign a random external IP address from the Yandex.Cloud pool, or select a static address from the list if you reserved one in advance.
  8. Under Access, specify the information required to access the VM:
    • In the Login field, enter your preferred username to be created on the VM, for example, ubuntu.
    • In the SSH key field, paste your public SSH key. You need to create a key pair for an SSH connection yourself.
  9. Click Create VM.

You may need to save disk snapshots of your VM. They contain a copy of the VM file system from when the snapshot was created.
You can use disk snapshots for various purposes, such as:

  • Transferring data from one disk to another, for example, to a disk in a different availability zone.
  • Creating a disk backup before performing operations that may cause damage to your data.
  • Performing disk versioning by regularly creating snapshots of the disk.

Create a MySQL database cluster

To create a MySQL database cluster:

  1. On the folder page in the management console, click Create resource and select MySQL cluster.

  2. Under Host class, select s2.micro. These characteristics are enough for 1C-Bitrix to run.

  3. Under Storage size, select the type of storage: either a more flexible network type (network-hdd or network-ssd) or faster local SSD storage (local-ssd). At this stage, leave the 10 GB network-ssd type. This size is enough for the current example.

  4. Under Database, enter:

    • DB name. Leave the default value, db1.
    • Username to connect to the database. Leave the default value, user1.
    • Password for 1C-Bitrix to access the MySQL database.
  5. Under Hosts, change the Availability zone for the database. To do this, click in the line with host details. In the window that opens, select the desired availability zone and click Save.

    We recommend selecting the same availability zone as when you created the VM. This reduces latency between the VM and database.

  6. To make your database fault-tolerant, you can add more hosts for it. To do this, select Add host and specify the availability zone to place it in.

  7. Leave the other fields as they are.

  8. Click Create cluster.

Creating the DB cluster may take several minutes. To check that the new cluster is available, select Managed Service for MySQL in the Yandex.Cloud management console. On the Clusters tab, the cluster status should be Running and its state should be Alive.

Configure a server to work with 1C-Bitrix

To configure the server to work with 1C-Bitrix:

  1. Log in to the created server using SSH.

    $ ssh ubuntu@<VM-public-IP>
    

    ubuntu: The username in the Login field that you set when creating the VM

    To find out the public IP address of your VM, on the folder page in the management console:

    1. Choose the Compute Cloud section.
    2. Click on the name of your VM (in this example, it's bitrixwebsite).
    3. A window opens with general information about your VM. You can find the public IP address in the Public IPv4 field under Network.
  2. Get administrator rights.

    ubuntu@bitrixwebsite:~$ sudo -i
    root@bitrixwebsite:~#
    
  3. Install the necessary software.

    root@bitrixwebsite:~# apt-get update
    root@bitrixwebsite:~# apt-get install -y apache2 libapache2-mod-php php-gd php-mbstring php-mysql
    
  4. Go to the project's working directory.

    root@bitrixwebsite:~# cd /var/www/html/
    
  5. Download the 1C-Bitrix: Site Management distribution.

    root@bitrixwebsite:/var/www/html# wget https://www.1c-bitrix.ru/download/standard_encode.tar.gz
    
  6. Unpack the downloaded archive and delete unnecessary files.

    root@bitrixwebsite:/var/www/html# tar -zxf standard_encode.tar.gz
    root@bitrixwebsite:/var/www/html# rm -f index.html standard_encode.tar.gz
    
  7. Assign the www-data user as the owner of the project's working directory.

    root@bitrixwebsite:/var/www/html# chown -R www-data:www-data /var/www/html
    root@bitrixwebsite:/var/www/html# ls -l
    total 76
    drwxrwxr-x 6 www-data www-data  4096 May 15 13:50 bitrix
    -rwxrwxr-x 1 www-data www-data  1378 May 15 13:50 index.php
    -rwxrwxr-x 1 www-data www-data   150 Mar 11  2013 install.config
    -rwxrwxr-x 1 www-data www-data 30741 Apr 10 14:36 license.html
    -rwxrwxr-x 1 www-data www-data   113 Nov 20  2012 license.php
    -rwxrwxr-x 1 www-data www-data 14054 Feb  6  2017 readme.html
    -rwxrwxr-x 1 www-data www-data   112 Mar 27  2013 readme.php
    drwxrwxr-x 2 www-data www-data  4096 May 15 13:50 upload
    -rwxrwxr-x 1 www-data www-data   691 Oct 27  2009 web.config
    
  8. Configure the PHP settings.

    In accordance with the information system requirements, you need to edit the following variables in the configuration file /etc/php/7.2/apache2/php.ini

    Previously Now
    short_open_tag = Off short_open_tag = On
    display_errors = Off display_errors = On
    memory_limit = 128M memory_limit = 256M
    ;date.timezone = date.timezone = Europe/Moscow
    ;opcache.revalidate_freq = 2 opcache.revalidate_freq = 0
    ;mbstring.func_overload = 0 mbstring.func_overload = 2

    To edit the file, use the built-in nano editor:

    root@bitrixwebsite:/var/www/html# nano /etc/php/7.2/apache2/php.ini
    

    To find the parameter you need in the nano editor, press Ctrl+W. Look for the required parameter in the table above and save the changes using Ctrl+O. To exit the editor, press Ctrl+X.

  9. Configure the Apache server. In accordance with the information system requirements, you need to edit the /etc/apache2/sites-enabled/000-default.conf file.

    1. Open the file in the text editor:

      root@bitrixwebsite:/var/www/html# nano /etc/apache2/sites-enabled/000-default.conf
      
    2. Add the following block after the DocumentRoot /var/www/html line:

      <Directory /var/www/html>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
      
    3. Restart the web server to apply all the new settings.

      root@bitrixwebsite:/var/www/html# service apache2 restart
      

After you run these commands, the server side is configured for proper operation of 1C-Bitrix.

Configure 1C-Bitrix

Install and configure 1C-Bitrix:

  1. Open the 1C-Bitrix: Site Management web interface at: http://<VM-public-IP-address>/. A page should open asking you to install 1C-Bitrix.

  2. Click Next.

  3. Read the license agreement and select I accept the license agreement. Then click Next.

  4. Since registration is optional, uncheck the corresponding checkbox. Leave Install in UTF-8 encoding and click Next.

  5. 1C-Bitrix checks if the server is configured correctly. View all the parameters on this page and click Next.

  6. Specify the parameters of the created database:

    1. In the Server field, enter the fully qualified domain name of the created database. To find it:

      1. Open the management console folder page in a new browser tab.
      2. Choose Managed Service for MySQL.
      3. In the table, select the database you created.
      4. Select the Hosts tab in the left menu.
      5. Hover over the Hostname (like rc1c-cfazv1dbzv02u4qk) and copy the database fully qualified domain name by clicking the icon that appears. As a result, the fully qualified domain name is added to the hostname and the Server field should contain a name like rc1c-cfazv1dbzv02u4qk.mdb.yandexcloud.net.
    2. In the Username and Password fields, enter the data that you specified when creating the database in Create a MySQL database cluster.

    3. In the Database name field, specify the name of the created database (db1).

    4. Leave the default values in the other fields.

    5. Click Next.

  7. Wait for the MySQL database to initialize.

  8. Create an administrator account to make changes to your system under. Fill in all the fields and click Next.

  9. Select the Information portal template and click Next.

  10. Confirm the selection of the only layout template and click Next.

  11. Select a color and click Next.

  12. Fill in all the fields according to your website requirements and click Install. This starts installing and configuring all system components. Wait for it to complete.

  13. After a while, a page appears saying that the system is installed and configured. To start working with the website, click Go to site.

  14. You're in content editing mode in the web interface of the system that is completely ready-to-use.

  15. To see the website homepage from a user's point of view, click Exit in the upper-right corner of the page to exit from your website admin panel and go to http://<VM-public-IP-address>/. To return to edit mode, log in to the website using the 1C-Bitrix administrator credentials.

How to delete created resources

To stop paying for your deployed server, just delete the created bitrixwebsite VM and DB cluster named BitrixMySQLdb.

If you reserved a static public IP address specifically for this VM:

  1. Open the Virtual Private Cloud in your folder.
  2. Go to the IP addresses tab.
  3. Find the address you need, click , and select Delete.
In this article:
  • Before you start
  • Required paid resources
  • Create a VM in the cloud
  • Create a MySQL database cluster
  • Configure a server to work with 1C-Bitrix
  • Configure 1C-Bitrix
  • How to delete created resources
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC