VirtualHost error (Just for one domain)

Discussion in 'Apache' started by woods, Jun 24, 2007.

  1. #1
    Hey,

    It seems that the serverName on one of my VHosts isn't working, it's written the exact same way as other ones that are working.. And it's starting to bug me.

    Here is the one that doesn't work:
    
    <VirtualHost *>
            ServerAdmin     *censor*
            ServerName      lololyrics.com
            ServerAlias     www.lololyrics.com
            ErrorLog        /var/log/apache2/error.lololyrics.com.log
            CustomLog       /var/log/apache2/access.lololyrics.com.log combined
            DocumentRoot    /var/www/domains/lololyrics/
    </VirtualHost>
    Code (markup):
    It works fine when you try to go to the site using www. when you try just lololyrics.com it is like it just bypasses the VHost and goes directly to the default one (Like when you go to the IP)

    I just tried to switch to ServerName:www.lololyrics.com and ServerAlias:lololyrics.com (the opposite) and it still produces the same error, so it's not the ServerName..

    Conclusion: It's just when it gets passed "lololyrics.com" that it fails to interpret.

    It simply logs the lololyrics.com visit in the normal access.log file
    [24/Jun/2007:18:47:00 +0200] "GET / HTTP/1.1" 302 - "-" 
    Code (markup):
    302 is because of the temporary redirect (read NOTE at the bottom)

    Here's an example of another one that works just fine:
    
    <VirtualHost *>
            ServerAdmin     *censor*
            ServerName      emasxp.com
            ServerAlias     www.emasxp.com
            ErrorLog        /var/log/apache2/error.emasxp.com.log
            CustomLog       /var/log/apache2/access.emasxp.com.log combined
            DocumentRoot    /var/www/domains/emasxp.com/
    </VirtualHost>
    Code (markup):
    Anybody have any clue what could possibly be wrong? I reinstalled the server recently and before it worked fine.

    NOTE: the root path of the IP leads to www.lololyrics.com as a temporary fix until this decides to play nice. :)

    thanks on beforehand, I bet it's some stupid error I might've done wrong. :)
     
    woods, Jun 24, 2007 IP
  2. zonzon

    zonzon Peon

    Messages:
    100
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    ensure that you dont have any .htaccess producing any kind of redirect in your DocumentRoot
     
    zonzon, Jun 24, 2007 IP
  3. woods

    woods Peon

    Messages:
    228
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yep checked that too before, only .htaccess I got is in the lololyrics.com DocumentRoot (for nicer looking urls), nothing that should block anything.. Tried without it anyway and still didn't work.

    Thanks for the help though
     
    woods, Jun 25, 2007 IP