I
I
imkotez2017-07-23 20:08:23
open server
imkotez, 2017-07-23 20:08:23

How to make multiple sites in local?

Hello, can I somehow make several local sites in OpenServer on the same ip address?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
A person from Kazakhstan, 2017-07-23
@LenovoId


several local sites, on the same ip address
they are already all on the same IP: localhost or 127.0.0.1
create as many folders (directories) as you like in domains, this will be local sites on one IP

M
Max, 2017-07-30
@matios

Just ran into the same problem today. Basically, everyone advises to create 1 domain, which will act as an alias and store all sites there. I don't think this is a good approach, since we are given the DOMAINS directory for a reason.
In general, the solution is a little crutch, but working.
1. Create an "external" domain, for example external.io
2. Set up an alias for it YOUR IP => external.io (so far everything is as usual, as for one domain)
3. Key point. Instead of moving all the desired domains to the external.io directory , you simply create a symlink to the desired domains (WARNING! Shortcut doesn't work! Only symlink).
mklink /j "c:\OpenServer\domains\external.io\test.io" "c:\OpenServer\domains\test.io" //Etc. for each desired domain
And open the site like this: http://YOUR_IP/test.io
The option is a crutch of course, but there is no better yet, I consider moving files physically to external.io even more crutches

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question