default domain for ip

bobkersten

New member
Joined
Jun 24, 2009
Messages
3
Hello everyone,

I've been searching the forums but couldn't find the solution for my problem. I have several users using the same shared ip address. When accessing the ip address directly in the browser (http://xxx.xxx.xxx.xxx/) a default da message pops up:

"This IP is being shared among many domains.
To view the domain you are looking for, simply enter the domain name in the location bar of your web browser."

The same happens if you enter an url that is set up for this ip but hasn't got a matching domain in da. That's indeed normal behaviour which I'd like to change. I'd like to be able to set a default domain for this ip. This domain is set up by one of the users of the ip and should load whenever no other domain matches.

I do like to add that I'm very pleased with the way da works. Been using it for a week now and everything else I wanted is provided by default.

Bye,
Bob Kersten.
 
Create a .htaccess file to do the redirect.

And where do you think I should place this file? I don't like a redirect, I like the unknown domain or direct ip to load a site specifically for that domain or ip. It should read something like this:

"the domain "domain" is reserved for future purpose bla bla"

Bye,
Bob.
 
And where do you think I should place this file?

In the same folder as the file that contains the message about the ip being shared. It will be in the /home/username/domains/sharedip folder. I cannot give you the exact location without know what user has been assigned this ip.

I don't like a redirect, I like the unknown domain or direct ip to load a site specifically for that domain or ip. It should read something like this:

"the domain "domain" is reserved for future purpose bla bla"

You can only do that if the ip is not shared. If somebody types in an ip that is shared with many domains what domain is going to be in the message about "the domain "domain" is reserved for future purpose bla bla"? There is no way to know what domain should appear in the message since there are many possible choices.
 
Thanks for your reply.

In the same folder as the file that contains the message about the ip being shared. It will be in the /home/username/domains/sharedip folder. I cannot give you the exact location without know what user has been assigned this ip.

No such folder (sharedip) exists on my system unfortunately.

You can only do that if the ip is not shared. If somebody types in an ip that is shared with many domains what domain is going to be in the message about "the domain "domain" is reserved for future purpose bla bla"? There is no way to know what domain should appear in the message since there are many possible choices.

Not exactly, because PHP can read the exact uri on which I can base that message even if there's no such domain name set up in DA. The only thing I'd like to achieve is to setup a html folder for everything that does not match a domain setup in DA, hence a default domain. It used to be able for me when I managed my apache configuration myself. Apache would then just pick the first virtualhost if i'm not mistaken.

I've done a grep on my system for that 'shared' message, but it appears as if it is hardcoded in the directadmin binary (if i'm talking bull, i'd like to know :-))

Thanks so far for your support btw.
Bob.
 
Last edited:
Thanks for your reply.



No such folder (sharedip) exists on my system unfortunately.

Every reseller account has one including admin

Not exactly, because PHP can read the exact uri on which I can base that message even if there's no such domain name set up in DA.

If a someone types in a domain and gets that message then you have something misconfigured on your server.

The only thing I'd like to achieve is to setup a html folder for everything that does not match a domain setup in DA, hence a default domain. It used to be able for me when I managed my apache configuration myself. Apache would then just pick the first virtualhost if i'm not mistaken.

I've done a grep on my system for that 'shared' message, but it appears as if it is hardcoded in the directadmin binary (if i'm talking bull, i'd like to know :-))

Thanks so far for your support btw.
Bob.

No its not hardcoded and in fact you can make it say anything you want. I have already told you where to find it. Instead of grep why don't use find.

Code:
find /home/*/ -name sharedip

There is definitely one in /home/admin/domains/
 
New to DA. In Plesk, this is a simple thing to do. Often helpful. Especially with new domains and people who do not want to touch their host file, which is often forgotten and left to be an issue in the future.
 
If I did that, it would be marked as a duplicate to this.
Maybe the post should be locked,
Make the date more noticeable, than the light gray color it has

But, sorry to have bothered you.
 
Post are never locked here like on most forums, you just have to check file dates.

Make the date more noticeable, than the light gray color it has
Yep, tell that to the forum developpers at Xenforo. ;)
It's like this on many forums.

Anyway. Since you probably got here via Google and responded, many new people make this mistake, it's not a biggy. I just wanted to inform you for the future, no harm done. ;)
 
Back
Top