A
A
Alexander2017-08-15 15:17:39
linux
Alexander, 2017-08-15 15:17:39

How to set up a virtual host for a 3rd level domain?

Configured a config for the domain:

<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/example.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

And similarly for the 3rd level domain:
<VirtualHost *:80>
    ServerAdmin [email protected]
    ServerName cloud.example.com
    ServerAlias www.cloud.example.com
    DocumentRoot /var/www/cloud.example.com/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

example.com - working
cloud.example.com - not working
"A" record in DNS made.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-08-15
@SnegirDev

Everything worked by itself, apparently it was necessary to wait until the registrar updated the records

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question