Answer the question
In order to leave comments, you need to log in
Is it possible to create subdomains from the Bitrix admin panel?
Please tell me if it is possible to create a subdomain from the Bitrix admin panel.
That is, I create an Infoblock or just a section - I call it test.
And the test.mysite.ru subdomain is automatically created.
They tell me it's real.
I say no, because how can you link the creation of a folder on the server
with CRM.
Answer the question
In order to leave comments, you need to log in
In order to perform such a "simple" action as creating a domain, you need to:
1. Have access to DNS, namely, indicate in DNS that there will be such a subdomain and it will refer to such and such an IP. Either solve this issue with a * mask and cut off "invalid" subdomains at the application level.
2. Have access to nginx/apache. After all, even if you added a wildcard to DNS and send all subdomains to the main site, you either need to configure nginx/apache to understand this mess, or edit the configs of these services from the application.
3. Okay, we have DNS, the web server is configured to listen to this subdomain, now it remains at the application logic level to see what came to us and for which domain and decide what kind of content to give us.
As for creating infoblocks or elements in them, there are eventListeners that can be used to intercept this event and respond to it accordingly.
If the DNS entry is *, all subdomains start leading to the Bitrix folder. Further, in the web server settings, this input must be designated as the default host. It remains only to set up the creation of Bitrix Sites on a standard API and manage the moments of loading data into them.
Your question is hard to understand out of context.
For example, the initial task may concern the functionality of the regionality of sites based on subdomains.
Something like:
site.ru
spb.site.ru
moscow.site.ru
In such statement of the problem it is possible to implement.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question