Views: 3678
Last Modified: 18.01.2021

Site creating

The following data is used for creating a site

  • Site name.
  • Site type (kernel, ext_kernel or link).
  • Site encoding.
  • Execution of agents on cron or no execution.
  • Additional options for connecting to MySQL (base, login, password) and DOCUMENT_ROOT for site.


What happens inside Bitrix environment when creating a site:

  • catalogs necessary for site operation are created.
  • database and login with password to connect to it are created.
  • cron entries are created.
  • apache, nginx configuration files are created.

Launching site via API:

/opt/webdir/bin/bx-sites -a create -s  -t kernel

Ansible-playbook:

ansible-playbook /etc/ansible/web.yml -e ansible_playbook_file=/opt/webdir/temp/<TASK_ID>/opts.yml

Site deleting

To delete a site, you need to only specify the delete site catalog.


What happens inside Bitrix environment when deleting a site:

  • site catalogs are deleted.
  • database and accesses to connect to it are deleted.
  • cron entries are deleted.
  • apache, nginx configuration files are deleted.

Launching site deleting via API:

/opt/webdir/bin/bx-sites -a delete -r /path/to/doc/root

Ansible-playbook:

ansible-playbook /etc/ansible/web.yml -e ansible_playbook_file=/opt/webdir/temp/<TASK_ID>/opts.yml



Courses developed by Bitrix24