Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Sorry if this is answered somewhere else but can't figure it out. Cant get my server to respond on the subdomain, only the main domain. Relevant info below, if you need more let me know.

Listen 10.0.1.191:80
ServerName server.local:80 (i know a bit stupid but logical for me and it works)
NameVirtualHost 10.0.1.191:80    

<VirtualHost 10.0.1.191:80>
ServerName www.server.local
ServerAlias server.local
DocumentRoot /var/www/html/
</VirtualHost>

<VirtualHost 10.0.1.191:80>
ServerName qtp.server.local
DocumentRoot /var/www/qtp/
</VirtualHost>

Cheers

Edit: Actually only the root works, neither virtualhost resolves. ie www.server.local doesn't resolve though server.local does

share|improve this question

2 Answers 2

Remove the ServerName directive outside of your <VirtualHost> containers.

share|improve this answer

You seem to be missing NameVirtualHost directive:

http://httpd.apache.org/docs/2.0/mod/core.html#namevirtualhost

At the moment you're using IP-based virtual hosting in your configuration, which doesn't make sense as you use the same IP:port combinations.

share|improve this answer
    
Sorry, my bad. I thought I put that in. I used that link and changed what I had but no success, also updated original question –  Rudiger Apr 21 '10 at 20:28
    
What response do you get from the subdomains? Are you able to ping through your subdomains? Or are you always getting the main page? –  Karol Piczak Apr 22 '10 at 10:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.