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.

Gamer-Source.com is not showing up properly, it's showing Starcraft-Source.com instead of it's own site. Can anyone point out any issues with the configuration below?

cdn.gamer-source.com is also not showing up.

/etc/hosts

127.0.0.1       localhost
127.0.1.1       spireprod
127.0.0.1       www.battle-report.com
127.0.0.1       www.gamer-source.com
127.0.0.1       cdn.gamer-source.com
127.0.0.1       www.seccbiblebowl.org //this domain works 100%
127.0.0.1       www.diablo-source.com
127.0.0.1       www.starcraft-source.com //this works as well

/etc/apache2/sites-available/gamer-source.com

<VirtualHost 64.253.105.250:80>
        ServerAdmin x@x.com
        DocumentRoot /home/source/public_html/
        ServerName www.gamer-source.com
        ServerAlias gamer-source.com
        ErrorLog /home/source/log/error_log
        TransferLog /home/source/log/access_log
</VirtualHost>
         <VirtualHost 64.253.105.250:80>
                  ServerName cdn.gamer-source.com
                  DocumentRoot /home/source/public_html/cdn/
         </VirtualHost>
         <VirtualHost 64.253.105.250:80>
                 ServerName img.gamer-source.com
                 DocumentRoot /home/source/public_html/img/
         </VirtualHost>

# ---------- Starcraft-Source.com -----------
<VirtualHost 64.253.105.250:80>
        ServerName www.starcraft-source.com
        ServerAlias starcraft-source.com
        DocumentRoot /home/source/public_html/starcraft-source/
</VirtualHost>
         <VirtualHost 64.253.105.250:80>
                 ServerName derwish.starcraft-source.com
                 DocumentRoot /home/source/public_html/derwish/
         </VirtualHost>

# ----------- Diablo-Source.com -------------
<VirtualHost 64.253.105.250:80>
        ServerName www.diablo-source.com
        ServerAlias diablo-source.com
        DocumentRoot /home/source/public_html/diablo-source/
</VirtualHost>

Update

This is very odd, I use VIM to modify these files. All of the other site configuration files show the correct coloring, where words like "ServerAdmin" and "ServerAlias" are teal and various elements colored. I don't see any syntaxual errors, what else could be causing that?

share|improve this question
    
What else is present in sites-available? –  David Spillett Aug 28 '10 at 13:00
    
Aside from the default, another configuration for another site that mirrors this configuration except for a different domain/path. –  Webnet Aug 28 '10 at 13:59

2 Answers 2

up vote 3 down vote accepted

Do you have the above config file enabled? Is it linked from /etc/apache2/sites-available/gamer-source.com to /etc/apache2/sites-enabled/gamer-source.com ? If it is, did you restart apache after enabeling it?

Do you have a NameVirtualHost directive somewhere in your apache config?

share|improve this answer
    
I do have NameVirtualHost within the ports configuration file for the IP that all of these sites are set to listen on. –  Webnet Aug 28 '10 at 13:06
    
@Webnet you haven't answered about the symlink though. You can force the symlink again with a2ensite game-source.com. –  ℝaphink Aug 28 '10 at 14:15
    
Doh! You're right, I never did that.... dangit! It's so easy to make a simple stupid mistake with all of this ^_^ –  Webnet Aug 28 '10 at 14:19
    
@Webnet no problem, it's called experience. You gain it by doing things wrong a lot, don't ask ;-) –  Joris Aug 28 '10 at 14:42

If I had to guess, its probably because apache differentiates between your external IP and your internal IP; from the VirtualHost page (see page for their example apache conf):

Requests for any address not specified in one of the directives (such as localhost, for example) will go to the main server, if there is one.

You may want to set your hosts file to have the domains use the appropriate IP.

share|improve this answer
    
I adjusted /etc/hosts to have the actual IP that the domains are listening on and it had no effect. –  Webnet Aug 28 '10 at 13:09
    
Did you restart networking once you made those changes? –  Andrew M. Aug 28 '10 at 13:52
    
Yes, I rebooted the server completely. –  Webnet Aug 28 '10 at 13:56

Your Answer

 
discard

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

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