Why are apache subdomains sending to the default site?

0

Today I have a PHP system that uses an IP, so it looks like this:

link

I'm configuring subdomains to respond to requests and stay like this

link

link

It turns out that the browser always goes to the main site, does not obey the subdomains ... I already have these settings on other servers, but this one insists on not obeying

The only thing that is different is that on the other servers I exclude the main site because I only use subdomains, the main site is hosted on other servers and the subdomains come via A entries in DNS

This also comes with DNS entries, but for now I can not delete the main site ... how can I make it understand that there are subdomains?

The file 000-default.conf looks like this:

<VirtualHost *:80>
 ServerAdmin [email protected]
        DocumentRoot /var/www/html

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

</VirtualHost>
    
asked by anonymous 10.09.2018 / 15:53

1 answer

0

I was making a banal mistake ...

I just changed from:

<VirtualHost sistema.empresa.com.br>
DocumentRoot /home/empresa/subdominios/clientes
ServerName sistema.empresa.com.br
...

for

<VirtualHost *>
DocumentRoot /home/empresa/subdominios/clientes
ServerName sistema.empresa.com.br
...

All right now

    
10.09.2018 / 16:36