VirutalHost and wrong 'default' site

Discuss Applications
Post Reply
User avatar
Basher52
guru
guru
Posts: 916
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

VirutalHost and wrong 'default' site

Post by Basher52 » Fri Feb 13, 2009 1:10 pm

This I better start a new thread, I kinda stole the other one even though it ended talking about VHost

With this thread i wonder what I missed that makes one domain: xenonlyse.se keeps coming up if I write something wring in the test version of the same site called: xenontest.hopto.org.
I think I missed something or even happened to remove something that I shouldn't have that makes xenonlyse.se just "popup" when browsing through the xenontest.hopto.org site.
This time I've check all the utilities settings and this time they are all OK.

with all this I mean, that if I write something wrong in the VHost config, like this:

Code: Select all

# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /xenonlyse /var/www/html/xenonlyse
<Directory /var/www/html/xenonlyse/>
   order allow,deny
   allow from all
</Directory>

NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin root@localhost
    DocumentRoot /var/www/html/xenonlyse
    ServerName xenonlyse.se
    ErrorLog logs/xenonlyse.se-error_log
    CustomLog logs/xenonlyse.se-access_log common
</VirtualHost>
Let's say I spell the 'ServerName' attribute wrong then it should popup an invalid sign or the standard apache page that says something like 'no site here' etc

Hoping this post will get to any of you :P me and my bad English lol

User avatar
Basher52
guru
guru
Posts: 916
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Sat Feb 14, 2009 2:50 pm

I think no one knows what I mean by this I guess

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Feb 14, 2009 4:37 pm

I don't know what you mean. :) There is no way one virtual host should know about the other virtual host and just randomly pull data from either if that's what you are saying. I that's happening it's most certainly something in your content causing it. I would have to see a specific example of what you are talking about. You are only showing a config for one vhost though, where's the other one?

User avatar
Basher52
guru
guru
Posts: 916
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Sat Feb 14, 2009 5:45 pm

I'll try to get an example for this, but not today... I'm too fuzzy :P

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Feb 14, 2009 6:38 pm

Just so you know I always set up apache so every site I have is a virtual host. What I think you are referring to as the "default" host is what you would get to if you put my IP address in your browser instead of my hostname. If you do that on my site you'll just get a page that says "Go Away!". Try it. :)

User avatar
Basher52
guru
guru
Posts: 916
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Tue Jan 26, 2010 12:41 pm

Long time to answer, but now I'm here again with the same problem :P
...and this time it IS the thing you're talking about, typing my IP instead of the site name and one of the sites I got there shows, but I want to configure the new one and it is this one I want to have as "default" when I write the IP address instead of the other one.
But maybe there are no way of doing this.
I'll keep trying tho...

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Jan 26, 2010 3:00 pm

In /etc/httpd/conf/httpd.conf the first place you find "DocumentRoot" should be what you point to whatever directory you want as the default

User avatar
Basher52
guru
guru
Posts: 916
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Tue Jan 26, 2010 3:35 pm

this is set to: DocumentRoot "/var/www/html"
but in that directory is no file, just directories of the other virtual hosts.
Four directories for four virtual hosts but no files what so ever.
Three sites are so far just for testing so the only one that is working is the one that is not for test, all other starts the same.
The only thing I've found so far is that the one that starts for the three test-sites is the last one I was fiddling with last spring and is listed first by its starting letter.
I also use .htaccess for these and the AuthUserFile is set to each directory so no error there.
I'm starting to think that it gotta be something with this .htaccess file but no luck finding anything yet.

User avatar
Basher52
guru
guru
Posts: 916
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Tue Jan 26, 2010 4:29 pm

YES, I found it, but I think it's kinda weird anyways...
Since the DNS don't seems to be updates yet, after over 3 hours :( :(
I use no-ip but I hadn't changed the conf for the site and that still pointed to the .se domain not the servehttp.com domain.
It works now, but how come it keep starting just this particular site named blbserver.servehttp.com and not any others.
When I found the error on one, I figured that it had something to do with that so I changed that conf too, but as I said... why THIS particular site?

THAT is the question :P

Post Reply