I
I
I'm Yoda2017-10-12 07:27:42
virtual box
I'm Yoda, 2017-10-12 07:27:42

How to rename site folders in VM Bitrix?

Hello! Please tell me how to rename the site folders on the Bitrix virtual machine? The fact is that when I added sites, the folder names for them were given site1.loc and site2.loc, etc. How to rename folders and in which files to make changes so that site folders have names like site1.ru, site2.ru and are available at site1.loc, site2.loc

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Emelyanov, 2017-10-12
@Anadi

Rename site1.locto site1.ru(or make a symlink)
In the nginx and apache configs, replace site1.locwithsite1.ru

  1. nginx :
    /etc/nginx/bx/site_avaliable/bx_ext_*.conf
    /etc/nginx/bx/site_avaliable/bx_ext_ssl_*.conf

    change directives:
    set $docroot "/home/bitrix/ext_www/*";
    root "/home/bitrix/ext_www/*";

But! don't touch directives
ServerName *
ServerAlias *
leave them the same so that sites continue to open at site*.loc
ps addresses before starting, back up /etc/nginx and /etc/httpd

A
Andrey Nikolaev, 2017-10-12
@gromdron

To perform this operation, you do not need to rename the folders - you need to correct the hosts file (so that there is a transition from site1.ru to site1.loc), because otherwise, without a registered domain, everything will be very bad.
And in order for site1.ru to open, you need to edit the nginx configuration.
Actually the name of the folders is rather for you not to get confused. Folders can be called at least www.supertest.batch.main, and open at www.site1.ru, at least at site1.io

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question