HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Installation/Configuration (
-   -   hostname points to web (

error.log 15th August 2012 03:21

hostname points to web
hello everyone

i added a domain to a customer, after that i added the server IP on which ISPConfig is running on. I assigned the ip to the webhost i recently added.

okay.. now i removed the ip because this was a mistake. but there is no effect. it seems that the ip is still connected with the domain.

ive installed the server step by step with this manual:

how can i remove the connection between the hostname (e.g. IP) and the webhost?

error.log 15th August 2012 03:47

I looked up the default vhost, but the root was correct there. I've already removed the web and added it again with other webX ID. But same situation...

I've totally no clue how to fix this...

tahunasky 15th August 2012 05:47

I dont really understand what you are getting at, but the only place you need to add ip address is in DNS setting for a domain or in the SYSTEM/SERVER IP.

If you delete the DNS record of the client/domain you made the mistake on and then add it again it should fix any IP problems.

Sir Henry 15th August 2012 13:03

I do not understand the problem either. What is wrong with your setup?

With virtual hosting you can either map ALL of your IPs (indicated with '*') to a web site or a specific one. If you change from a specific one to a wildcard, then any of your IPs will map to your site.

Or is the problem that you expect a different site when you direct your browser to the numeric IP?

error.log 15th August 2012 14:33


first of all thank you for your answers.

Maybe I didn't explain it very clearly.

I've a domain let's say, on my webserver the hostname is (it should point to /usr/share/nginx/www which is described in vHost for "default"). Also the IP (123.456.678.9) should point to this directory, but it doesn't.

It points to the web from a client. And that since I've assigned the IP via control panel at the "sites" tab to this customer before. So I didn't choose wildcard but exactly this IP.

After I removed this - because I thought this will give the IP private to the customer - I noted that the IP (123.456.678.9) - which pointed correctly to the nginx ww before, shows now the web of the client.

I don't have that IP listed as server IP, because I want to have this IP pointing to the nginx-ww like hostname ( and all other IPs which are pointing to that server but not assigned to any customers.

But they all point to the web from this one client... I really don't know why. I followed the installation tutorial step by step.

tahunasky 15th August 2012 20:50

I think I understand what you are getting at: if you just type in the IP address of the server its points to the DocumentRoot of a clients domain and not the default web DocumentRoot directory of I had the same problem, it would point to the first domain in my DNS list. The way i fixed this was to create a new default virtual host record.

You need to relise that HOSTNAME and DOMAIN NAME are 2 different things. Even though hostname can be/is a fully qualified domain name, unless you setup a site for it there will not be one. You need to go to SITES/WEBSITES/ADD NEW SITE and create new site for . So if someone puts in your servers IP address it will default to the first domain record (for me it was the first domain is DNS list) that is loaded (in apache anyways)

I use Apache, so not sure about nginx (but someone should be able to tell you want to do for nginx), but what i did for apache was:

create a new default /etc/httpd/conf/sites-available/_default.vhost file, then added the following code at the top:


<VirtualHost _default_:80>
    DocumentRoot /var/www/



<VirtualHost 123.456.678.9:80>
    DocumentRoot /var/www/

You can change the DocumentRoot to point to wherever you want.

Then i created a symbolic link to the file /etc/httpd/conf/sites-enabled/000-default.vhost


ln -s /etc/httpd/conf/sites-available/_default.vhost /etc/httpd/conf/sites-enabled/000-default.vhost
This will catch all http requests to the IP address.

error.log 18th August 2012 03:18

Thank you very much.
It works now like it should!

I've just one question. What can I set for ServerName, so every domain/IP which isn't assigned yet will go into there?

Finally I've got it working by following this hint:

tahunasky 18th August 2012 23:06

for my setup this is what i have for the default site, if they type in an IP address or if there is no site associated with the a domain name. i put it at the top of my _default.vhost file and i dont have a ServerName key in the section:


<VirtualHost _default_:80>
        DocumentRoot /var/www/html/
        ErrorLog /var/log/httpd/default-error_log
        CustomLog /var/log/httpd/default-access_log common

All times are GMT +2. The time now is 21:03.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.