Answer the question
In order to leave comments, you need to log in
How to configure Yii2 to work in the absence of a domain?
Hello!
I'm trying to figure it out with Yii2.
I put it on a site whose address is not registered in DNS. Conditionally, my-domain.ru. This is the hosting directory where the site is located.
The site is accessed exclusively by IP address.
But Yii2, when processing a POST request, does not go to an IP address, but to this conditional domain, which does not exist for the entire network.
How and where is it correct to set it up?
Answer the question
In order to leave comments, you need to log in
Register your dns and work quietly with the domain.
In the hosts file, add the line
your domain ip of your server,
for example
google.com 7.7.7.7
In linux, the file is located at /etc/hosts
In windows %WinDir%\System32\Drivers\Etc
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question