D
D
Danila2016-09-17 12:48:12
Apache HTTP Server
Danila, 2016-09-17 12:48:12

Why are 2 identical sites opened on a subdomain and on a domain?

Hello! The question came up again (I was already helped here) about Apache virtual hosts
In the file /etc/apache2/sites-available/000-default.conf :

<VirtualHost *:80>

        #redcap52.ru
  ServerName redcap52.ru
        ServerAlias www.redcap52.ru
  ServerAdmin [email protected]
  DocumentRoot /var/www/html
        #dfkids
        ServerName dfkids.redcap52.ru
        ServerAlias www.dfkids.redcap52.ru
        DocumentRoot /var/www/dfkids
  

  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

OS: Debian Jessie 8.5
For some reason, 2 identical sites open, both with the contents of the /var/www/dfkids folder

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SagePtr, 2016-09-17
@SagePtr

What is the version of Apache? In the old version, you had to use the NameVirtualHost directive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question