D
D
dfhusfhgsuo32018-06-01 00:35:57
htaccess
dfhusfhgsuo3, 2018-06-01 00:35:57

How to display one site across 4-5 different domains?

Hello.
There is a trivial task. I want the site to be opened through 4-5 different domains (for users) and when you go to site2.com, the site is easily displayed on site2.com without any redirects to the first domain. And so each of the domains.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Taran, 2018-06-01
@shambler81

ServerAlias ​​was created for this

<VirtualHost *:80>
                DocumentRoot /var/www/site.ru/web
                ServerName site1.com
                ServerAlias www.site1.com www.site2.com site2.com www.site3.com site3.com
...

In principle, you can also write a name to the server,
or put it in the default folder, in general, any unparsed request goes into it
by default, this is /var/www, but it’s better not to do this.

S
Sergey, 2018-06-01
@butteff

apache virtual hosts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question