Answer the question
In order to leave comments, you need to log in
How to set up Internet access to multiple sites on OpenServer?
There are following sites on OpenServer:
dev.test1.ru
dev.test2.ru
dev.test3.ru
82.111.222.333
82.111.222.333/dev.test1.ru - открывался бы один сайт
82.111.222.333/dev.test2.ru - открывался бы другой сайт
82.111.222.333/dev.test3.ru - открывался бы третий сайт
82.111.222.333
one of the sites will open test
, depending on what I link. Answer the question
In order to leave comments, you need to log in
I analyzed some facts and hap2yman 's answer :
When accessing the address myIP/domain
, the desired site does not open, although logically it should, because for the IP address dev.testN.ru
this is the folder that it should open.
If there is a folder localhost
and various sites in it, then you can access it in the address bar localhost/someSiteName
- everything opens. And the folder localhost
corresponds to the address 127.0.0.1
(local machine)
The documentation openServer
says:
------
So. How to make several external sites:
1) In the folder , domains
delete the folder localhost
(or change its name to remove the association with 127.0.0.1)
2) In the folder domains
, create a folder that will serve as the root for the domains. For example routeFolder
. There will already be folders in it dev.test1.ru, dev.test2.ru, dev.test3.ru и т.д.
3) In the settings -> tab "Server" -> IP-address of the server we set our external IP
4) In the settings -> tab "Aliases" -> we bind the IP to the `routeFolder` folder and save the setting
Everything, restart the server.
PS Do not forget to open the port to enter from the external device.
PPS When typing IP, a folder with our domains will be visible. So that they are not visible, you can routeFolder
throw in the root (i.e. in the folder).htaccess
, which will automatically redirect from the root, for example, to site No. 1
Link dev.test1.ru, create directories dev.test1.ru, dev.test2.ru and dev.test3.ru in it. This is not enough?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question