domain/website claiming IP of server

uberguru

Verified User
Joined
Apr 30, 2011
Messages
97
i have a server with 1 IP address and there are several websites served but the IP address resolves to one website of all the websites.
What i basically mean is if i enter the IP address in the address bar it goes to one website. And because of this any domain that has no content that i point to this IP address automatically resolves to that same website. This is definitely very bad and i have never had this problem before.

Can someone please tell me why is this? and how do i stop this?

Thanks.
 
On a shared ip the directory called for web is /var/www/html

If you want to send user that connect directly to IP to a specific website just put a index.php with a redirect in it to the website you want.

Regards
 
On a shared ip the directory called for web is /var/www/html

If you want to send user that connect directly to IP to a specific website just put a index.php with a redirect in it to the website you want.

Regards

There are different httpd.conf files for the different users i have and all of them look the same but for some reason the IP goes to one website of all the websites. So what file do i edit and what line do i edit?

Also remember if i have a website setup under a user then everything is fine and the website is served but if i set a domain name to point to the IP it automatically serves the content of that one website..as if its a duplicate website...it just looks crazy
 
Sorry but i dont understand what you mean.

Every user have his own httpd.conf that's right and you cant edit that normally cause they get rewritten from directadmin control panel.

When an ip is shared between more user the url http://IP always point to /var/www/html and aswell that cannot be changed unless you chattr the file for dont get rewritten.

The best solution is still the one i did expose on first reply.

If i didnt get what you mean, i cant do a better reply, maybe provide website and ip with some samples can be better for understand your needs.

Regards
 
On a shared ip the directory called for web is /var/www/html
Regards

I saw what you wrote but its not clear to me.
Where do i go in DirectAdmin to change the directory to /var/www/html?
How do i change to shared IP?

These are things i cannot find in your reply. So if you can give a better details that will be greatly appreciated.
 
Just the fact that you was able to set multiple domain on 1 single IP means the IP is shared.

You cant change /var/www/html unless you do some work in ssh shell.

Unless you dont know what to edit and how i strongly suggest you to DONT do that and to hire someone that manage your server or do this single work for you.

Regards
 
Just the fact that you was able to set multiple domain on 1 single IP means the IP is shared.

You cant change /var/www/html unless you do some work in ssh shell.

Unless you dont know what to edit and how i strongly suggest you to DONT do that and to hire someone that manage your server or do this single work for you.

Regards

If i wanted to hire someone i wouldn't have come here.
If there is a file i need to look at and edit then let me know; will prefer that to telling me to hire someone.

Plus i have noticed u suggest hiring someone more than helping people most times..i mean not sure if your signature is the one causing this.
 
Let's start over...
i have a server with 1 IP address and there are several websites served but the IP address resolves to one website of all the websites.
There's no way for a server to know which website you want to see unless you tell it.
What i basically mean is if i enter the IP address in the address bar it goes to one website. And because of this any domain that has no content that i point to this IP address automatically resolves to that same website. This is definitely very bad and i have never had this problem before.
What did you see before?

What do you mean by no content? Do you mean the account hasn't been set up yet on the server? That must be what you mean, because if you set up an account for a domain, DirectAdmin does set up content; a placeholder.

So what would you rather see when you type in an IP#?

Note that what I'd expect to see is the is the this IP# is shared notice. But I too have occasionally seen this behavior, usually on older servers.

Is this the problem you'd like resolved? Is this the resolution you expect?

Jeff
 
Let's start over...

There's no way for a server to know which website you want to see unless you tell it.

What did you see before?

What do you mean by no content? Do you mean the account hasn't been set up yet on the server? That must be what you mean, because if you set up an account for a domain, DirectAdmin does set up content; a placeholder.

So what would you rather see when you type in an IP#?

Note that what I'd expect to see is the is the this IP# is shared notice. But I too have occasionally seen this behavior, usually on older servers.

Is this the problem you'd like resolved? Is this the resolution you expect?

Jeff


The IP is shared obviously as the other domains setup (files uploaded to be served) have the same IP.
Any domain name i point to the IP address, but that haven't been setup or created in directadmin or ssh at all, they all go to that website.


What i want is i dont want the IP(when type IP in address bar) to go to this website but rather go to a page that says something like "Server is running fine!"
Also i dont want other domains/url to point to this website but rather show a page that says the website is not available or something like that.
 
99% of my post use to route users to solve their problem, just when user cant explain well or show that is not able to understand what i say i use to suggest hiring someone, and usually i suggest me zeiter jeff and few others.

Since i did already replied two times i tell you the new reply checking what new have you wrote now.

The default page for the new created is in /home/admin/domains/default/
The defualt page for shared ip usually is in /home/admin/domains/sharedip/
The default page for server ip usually is in /var/www/html/

If you dont create the domain on DA but point DNS to the IP, you will have sharedip page if it is a shared ip or /var/www/html/ page if server ip.
The fact that an IP go to a website usually happen when is set as owned for a user, but, seems not to be your case.

I cannot know what you did change on default setup and why new domain point to another website, the main thing i can think is that you did change the content of default folder in admin domains user folder.

After that, since i dont know how much help you without knowing the real status of the Server i'll not help anymore and hope Jeff can help you.

And feel free to check all my 4K post before say i just suggest always to hire, and try to ask around how many time i did fixed by my hand for free.

Regards
 
I can't go further unless I log in and look, and I always charge for that; I feel my time is worth it. Please feel free to contact me, SeLLeRoNe, or one of the other contract admins who post here, if you'd like one of us to look at your server. The best way to contact me is by email; address is below.

Jeff
 
The IP is shared obviously as the other domains setup (files uploaded to be served) have the same IP.
Any domain name i point to the IP address, but that haven't been setup or created in directadmin or ssh at all, they all go to that website.


What i want is i dont want the IP(when type IP in address bar) to go to this website but rather go to a page that says something like "Server is running fine!"
Also i dont want other domains/url to point to this website but rather show a page that says the website is not available or something like that.

I guess your httpd configs are messed, you as well as other should have /etc/httpd/conf/extra/httpd-vhosts.conf with

Code:
#
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

##########################################################
# Use name-based virtual hosting.                        #
# All NameVirtualHost lines are in this file             #
# Don't remove this line or apache will generate errors. #
##########################################################
Include /etc/httpd/conf/ips.conf

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost 11.22.33.44:80>
    ServerAdmin webmaster@localhost
    AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2
    DocumentRoot /var/www/html
    ServerName localhost
    ScriptAlias /cgi-bin/ /var/www/cgi-bin/
    CustomLog /var/log/httpd/homedir.log homedir
</VirtualHost>

<VirtualHost 11.22.33.44:443>
    ServerAdmin webmaster@localhost
    AliasMatch ^/~([^/]+)(/.*)* "/home/$1/public_html$2"
    DocumentRoot /var/www/html
    ServerName localhost
    ScriptAlias /cgi-bin/ /var/www/cgi-bin/
    CustomLog /var/log/httpd/homedir.log homedir

    SSLEngine on
    SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
    SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
</VirtualHost>

If you have no such a file or it's empty that might the reasons on why the Apache behavior in the way you described. In this case you should put the content with your IP (replace 11.22.33.44), or run

Code:
cd /usr/local/directadmin/custombuild/
./build rewrite_confs

Note, with rewriting apache configs (the lowest example) you might lose all customizations made to your apache in not proper way (of course if done any). So check the /etc/httpd/conf/extra/httpd-vhosts.conf and see what is in there.
 
If you go to the ip address http://123.456.789 it will match the first vhost it sees. In order for you to make a functioning as normal page you should just make a virtualhost in one of the apache configs in /etc/httpd/conf which are loaded before all the other configs. Make sure you put it before the include line of the other vhosts.
 
maybe I am missing something but it seems as if its going to the default server page.
as it is supposed to.
mine says, with no modifications: Apache is functioning normally
 
Back
Top