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

  • Which effect do you expect? Both virtual hosts have the same document root. They will show the same content. – Matteo Jun 26 '14 at 10:41
  • images.login.acorn.lt doesn't work at all, i added same root just for the test @Matteo – Ben Jun 26 '14 at 10:42
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)
  • so how do i get it to do that? – Ben Jun 26 '14 at 10:56
  • By your DNS registrar. In the same way you registered login.acorn.lt – Matteo Jun 26 '14 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.

  • 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 Jun 26 '14 at 12:11
  • improved the answer @Fazer87 – Innovator Jun 26 '14 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 Jun 26 '14 at 12:17
  • got it...might be upvoted now :) – Innovator Jun 26 '14 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.