L
L
Lola Gasanova2020-10-20 17:09:35
Domain Name System
Lola Gasanova, 2020-10-20 17:09:35

How to add a second domain to a site so that two domains link to one site?

5f8ef563b418b308685410.png
The site is located on the server and one domain name is already linked to the site. You need to add a second domain (so that two domains link to one site). The server has a PROXMOX system.

Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2020-10-20
@sergey-gornostaev

  1. The A-record of the second domain contains the address of the web server
  2. The second domain is registered in the web server configuration
  3. PROFIT

V
Viktor Taran, 2020-10-20
@shambler81

Technically, you can do it in many ways
1. you just add a name server through porbel
2 or through an alias server, the same thing in nignx (directives are called differently there but also separated by a space)
well, if you have a web panel, then there is usually a place where You can enter them, just through the space.

<VirtualHost *:82>
               DocumentRoot /var/www/clients/client132/web171/web
                ServerName 3dpaneli.ru site.ru site2.ru 
                ServerAlias www.3dpaneli.ru site5.ru
                ServerAdmin [email protected]
                ErrorLog /var/log/ispconfig/httpd/3dpaneli.ru/error.log

3. Create 2 separate sites with two different domains leading to 1 folder.
4. this is the third option, but instead of one folder, the site has different folders, one of which is a symlink, see man on bash ln -s
5. two sites from the nginx slave site are proxied to the first through proxy_pass
6. mod_proxy - analog 5 for Apache.
7. There is only one site on the server and it lies in a folder without an explicitly specified domain, for example listen 80 default_server;(a purely installed Apache or nginx has such a configuration), in this case, any domain referring to this IP will open the same site.
In reality, the first two should be enough for you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question