Dedicated IP for specific domain doesn't work

zurih

Verified User
Joined
Jun 26, 2006
Messages
23
Hi
I'm in VPS and I just bought a addition IP address and trying to configure it to a specific single domain.

I have added it as admin, then attached it to a reseller, from there attached it to a user, and then as a user I added the IP to one of the domains.

After adding it I have two IP attached to it - one the new dedicated IP and the other is the old shared IP.

I have changed all A records for the domains to point to the new IP.

The problem is that the dedicated IP address doesn't seem to work.
Meaning - when I browser the IP from a browser, I get "Apache is functioning normally" instead of the website.

I have checked /usr/local/directadmin/data/users/user/httpd.conf and it seems fine (I replaced real values to "user" and "domain.com":

Code:
<VirtualHost xx.xxx.xxx.xx:80 >
        ServerName www.domain.com
        ServerAlias www.domain.com domain.com
        ServerAdmin webmaster@domain.com
        DocumentRoot /home/user/domains/domain.com/public_html
        ScriptAlias /cgi-bin/ /home/user/domains/domain.com/public_html/cgi-bin/

        UseCanonicalName OFF

        SuexecUserGroup user user
        CustomLog /var/log/httpd/domains/domain.com.bytes bytes
        CustomLog /var/log/httpd/domains/domain.com.log combined
        ErrorLog /var/log/httpd/domains/domain.com.error.log
        <Directory /home/user/domains/domain.com/public_html>
                Options +Includes -Indexes
                php_admin_flag engine ON
                <IfModule !mod_php6.c>
                        php_admin_flag safe_mode OFF
                </IfModule>
                php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f user@domain.com'
                php_admin_value open_basedir /home/user/:/tmp:/var/tmp:/usr/local/lib/php/

        </Directory>
</VirtualHost>
In addition, I have noticed that when I had a shared IP to the domain, under "Current IPs Assigned to domain.com", the shared IP was in green color.
The new dedicated IP is normal black.
Does it mean anything?

Where I got from here?

Thanks in advance
 

NoBaloney2

NoBaloney Internet Svcs.
Joined
Jun 17, 2007
Messages
498
Location
California
The first thing to check is whether or not the IP# is actually working on the server. We can't help you with that because you didn't give us real information.

Jeff
 

zurih

Verified User
Joined
Jun 26, 2006
Messages
23
It's working.
The only problem is that when I browse to the IP address (http://<ip_addr>), it gives me the apache message instead of my website
What information you need? I'll be glad to provide..
 
Last edited:

NoBaloney2

NoBaloney Internet Svcs.
Joined
Jun 17, 2007
Messages
498
Location
California
Sorry I overlooked that. The way I'd start debugging this would be to watch the main apache log.

Jeff
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
What is results for

Code:
netstat -an | grep LISTEN | grep ^tcp
?

Will you provide us with real IP address so we could check it. Send me a PM if do not want to share it in public.
 

Saytik

Verified User
Joined
Jan 17, 2012
Messages
8
directadmin dedicated IP problem

Hello.

What is the solution ?
I have the same problem with dedicated IP. I have added IP, set up SSL and now https iw working but http isn't. In config file two virtual hosts for :80 and :443

please help me where to find the problem?

(freenbsd)
sockstat -l - shows that httpd isn't lisstening 80 port on dedicated IP, but why ?

(sorry for my english)
 

Saytik

Verified User
Joined
Jan 17, 2012
Messages
8
/etc/httpd/conf/httpd.conf
- here is only main shared ip:80

/etc/httpd/conf/ips.conf
- here is all ips NameVirtualHost, and my dedicated ip is present in /etc/httpd/conf/ips.conf
NameVirtualHost DedicIP:80
NameVirtualHost DedicIP:443
there are two Vhosts in /usr/local/directadmin/data/users/ssl/httpd.conf with my dedicated IP:
<VirtualHost DedicIP:80>
....
<VirtualHost DedicIP:443>
...
Code:
httpd -t -D DUMP_VHOSTS
- shows that Vhosts are correctly configured with dedicated IP

But it is not working on port 80 :-(
 

Saytik

Verified User
Joined
Jan 17, 2012
Messages
8
zEitEr, THANK YOU VERY MUCH!

I have changed to *:80 and my domain is working now.

ave the last question: where I can change this Litesn port via DA panel ?

I have changes manually, but it si incorrect ...
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
Directadmin does not give any other way to change it, so it should be done manually or by rewriting of all configs.
 

Saytik

Verified User
Joined
Jan 17, 2012
Messages
8
I hope that options in a config won't fray at any changes of options in the control panel

Thank you again for your fast helping!
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
14,255
Location
GMT +7.00
This

Code:
Listen 80
is set by default with Directadmin installation. In your case it was modified by someone for any reason, which is out of my scope. So double check, that everything is working OK on your server. Do you have any other extra software, which listens 80 port? Even 127.0.0.1:80? NGINX? Lighttpd? Anything else?
 

Saytik

Verified User
Joined
Jan 17, 2012
Messages
8
Yes, we have nginx on another IP address. But now all is ok, i have changed apache port to *:80 and nginx is still working fine
 

Saytik

Verified User
Joined
Jan 17, 2012
Messages
8
yes, i have tried to restart nginx and all is ok.


P.S "Random Question:" very tired me on this forum, I am not bot, it would be better to disable "Random Question:" for registered users.
 

NoBaloney2

NoBaloney Internet Svcs.
Joined
Jun 17, 2007
Messages
498
Location
California
P.S "Random Question:" very tired me on this forum, I am not bot, it would be better to disable "Random Question:" for registered users.
Lots of anti-spam provisions have been set on this forum, and they really help. Another forum I moderate doesn't have any such provisions and we get over 200 new signups per day, all spammers. If I override the manual approval process on that forum it gets hundreds of new spams a day. So I doubt this forum will be relaxing any of the enti-spam provisions soon. Once you've made more posts you'll become a Verified User and the need will go away.

Jeff
 

Saytik

Verified User
Joined
Jan 17, 2012
Messages
8
thank you for your answer.
I can't just to find correctly the answer to a question "one three five seven" :)

I love only "What is the fourth word of this question?". I can't find answers to other questions :)
 
Top