-1

I need to add a subdomain to this server, i added this

NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /var/www/html
    ServerName images.login.acorn.lt
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot /var/www/html
    ServerName login.acorn.lt
</VirtualHost>

config to /etc/httpd/conf/httpd.conf and restarted with apachectl -k graceful , without error. But images.login.acorn.lt is down

Ben
  • 101
  • 3

2 Answers2

2

You need a valid DNS record for your subdomain too. You can accomplish this by either setting up an individual DNS entry for each new subdomain, or just creating a wildcard entry for *.domain.com that is a CNAME to domain.com. With the wildcard method, you can put whatever.domain.com in your apache config, and they will all just work without any other configuration. But every namebasedvirtualhost has to have a valid DNS entry. Moreover custom domain name must be allowed on server.For Custom sudomain domain name you have to specify and register proper dns.

TBI Infotech
  • 1,584
  • 10
  • 17
2

You have register your custom sub-domain name with dns registrar to make it it working.

Innovator
  • 507
  • 2
  • 11