Subdomain added, but on website I see only sub.mydomain.com server IP address could not be found

rbm

New member
Joined
Jan 27, 2021
Messages
3
I added subdomain. It was created. In public_html folder there is a folder for my subdomain.
In DNS my subdomain is added too as record A with IP like for domain 77.xxx.xx.xx
When I try open my subdomain addres in webbrowser I have error:
sub.mydomain.com server IP address could not be found

Domain works and I can open webpage by url with main domain.
I have https. But subdomain doesn't work for http and https.

I read that maybe I have to configure wildcard. But I don't know how.
In httpd.conf I have configuration for my subdomain:
  1. <VirtualHost 77.xxx.xx.xx:80 >
  2. ServerName www.sub.mydomain.com
  3. ServerAlias www.sub.mydomain.co sub.mydomain.com
And for https section:
  1. <VirtualHost 77.xxx.xx.xx:443 >
  2. SSLEngine on
  3. SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
  4. SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
  5. SSLCACertificateFile /etc/httpd/conf/ssl.crt/server.ca
  6. ServerName www.sub.mydomain.com
  7. ServerAlias www.sub.mydomain.com sub.mydomain.com
 
Did you wait for the DNS to propagate? It can take up to 24 hours.
 
The main domain was visible after short time maybe one hour. Subdomain was created a couple of hours age and still is the same message.
 
Back
Top