- We go to the VestaCP control panel at http://you_ip_adress:8083/
- Create a domain in the VestaCP control panel.
- We connect to the server via SSH (instructions for connecting using the SSH protocol here) and go to the site directory:
/home/admin/web/example.com/public_html/
(where instead of example.com is your site).4. We execute the command:
rm -f index.html && rm -f robots.txtInstalling Yii2 via Composer.
1. Next, install Composer:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
2. Now you need to go to the directory of your site, in our case it is:cd /home/admin/web/yiizomro.com/
3. Now install Yii with the following command:composer create-project --prefer-dist yiisoft/yii2-app-basic public_html/
4. We agree with all the conditions (enter yes and y twice)5. Next, issue admin rights for the public_html directory
chown -R admin:admin /home/admin/web/yiizomro.com/public_html/
6. Then we edit the domain and add a self-signed certificate for a while


http://yiizomro.com/web/index.php where instead of yiizomro.com is the name of your site.

http://yiizomro.com/basic/requirements.php
But on the server you will probably want to change the application URLfrom http://example.com/web/index.php to http://yiizomro.com/index.php or just http://yiizomro.com/.
To do this, you need to edit httpd.conf and nginx.conf as follows:
vim /home/admin/conf/web/example.com.httpd.conf and add web in the places indicated in the screenshot, and comment the line php_admin_value open_basedir:


service httpd restart
service nginx restart
Now your site opens by domain without unnecessary paths, pleasant work :)