0

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

2
  • Which effect do you expect? Both virtual hosts have the same document root. They will show the same content.
    – Matteo
    Commented Jun 26, 2014 at 10:41
  • images.login.acorn.lt doesn't work at all, i added same root just for the test @Matteo
    – Ben
    Commented Jun 26, 2014 at 10:42

2 Answers 2

0

In order to have images.login.acorn.lt to work you have to assign the same IP as login.acorn.lt (they have both to point to your address).

At the moment images.login.acorn.lt is not registered.

$ host login.acorn.lt
login.acorn.lt has address 79.98.30.58
$ host images.login.acorn.lt
Host images.login.acorn.lt not found: 3(NXDOMAIN)
2
  • so how do i get it to do that?
    – Ben
    Commented Jun 26, 2014 at 10:56
  • By your DNS registrar. In the same way you registered login.acorn.lt
    – Matteo
    Commented Jun 26, 2014 at 10:57
1

You have register your custom sub-domain name with dns registrar to make it it working. I mean 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, 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.

4
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post.
    – Fazer87
    Commented Jun 26, 2014 at 12:11
  • improved the answer @Fazer87
    – Innovator
    Commented Jun 26, 2014 at 12:16
  • Much better :) Generally people are asking for help because they dont know how or why. Just answering HOW may not help them or others in the long run
    – Fazer87
    Commented Jun 26, 2014 at 12:17
  • got it...might be upvoted now :)
    – Innovator
    Commented Jun 26, 2014 at 12:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .