Answer the question
In order to leave comments, you need to log in
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
Rename site1.loc
to site1.ru
(or make a symlink)
In the nginx and apache configs, replace site1.loc
withsite1.ru
/etc/nginx/bx/site_avaliable/bx_ext_*.conf
/etc/nginx/bx/site_avaliable/bx_ext_ssl_*.conf
set $docroot "/home/bitrix/ext_www/*";
root "/home/bitrix/ext_www/*";
ServerName *
ServerAlias *
leave them the same so that sites continue to open at site*.loc
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 questionAsk a Question
731 491 924 answers to any question