Dedicated IP Addresses for user Domains.

zinnium

Verified User
Joined
Dec 21, 2014
Messages
23
This is probably something really simple.

I got a user with 3 Domains. 1 Domain for a basic share, and 2 that need dedicated IP addresses.

All 3 Domains are on a shared IP. I went into the reseller panel, and added 2 IPs to the account.

I then went into the user account and edit the DNS records of the 2 sites needing the assigned IP addresses.

Then I waited a day. If you go to the sites by its domain name, it takes you to the sites page. When I go to the IP addresses of either site, they just point right back to the Reseller's page and not their site.

Is there something I am missing here?
 
Its been about 40hours since I assigned the IP addresses. Still get the weird results.

Both Domains resolve if you got their Domain: example.com -> example.com

BUT still if I try their IP address, they resolve to the reseller index.html: [Domain IP] -> Reseller's index.html

Really just not getting whats going on.
 
Hello,

What status of the IP you see as admin on IPs list page? What IP do you see for the virtual host of your webserver ?
 
Hello,

What status of the IP you see as admin on IPs list page? What IP do you see for the virtual host of your webserver ?

Here is my IP view.
[table="width: 500"]
[tr]
[td]IP[/td]
[td]Status[/td]
[td]ReSeller(s)[/td]
[td]User(s)[/td]
[td]NameServers[/td]
[td]netmask[/td]
[/tr]
[tr]
[td]xx2.xx1.144.98[/td]
[td] owned[/td]
[td] ReSeller[/td]
[td] ReSeller[/td]
[td][/td]
[td]255.255.255.248[/td]
[/tr]
[tr]
[td]xx2.xx1.144.99[/td]
[td]free[/td]
[td] ReSeller[/td]
[td][/td]
[td]NS1.[/td]
[td]255.255.255.248[/td]
[/tr]
[tr]
[td]xx2.xx1.144.100[/td]
[td] owned[/td]
[td] ReSeller[/td]
[td]End_User[/td]
[td][/td]
[td]255.255.255.248[/td]
[/tr]
[tr]
[td]xx2.xx1.144.101[/td]
[td] owned[/td]
[td] ReSeller[/td]
[td]End_User[/td]
[td][/td]
[td]255.255.255.248[/td]
[/tr]
[tr]
[td]xx2.xx1.144.102[/td]
[td]shared[/td]
[td] ReSeller[/td]
[td]1[/td]
[td][/td]
[td]255.255.255.248[/td]
[/tr]
[tr]
[td]xx2.xx2.98.202[/td]
[td]server[/td]
[td][/td]
[td]2[/td]
[td][/td]
[td]255.255.255.248[/td]
[/tr]
[tr]
[td]xx2.xx2.98.203[/td]
[td]free[/td]
[td] ReSeller[/td]
[td][/td]
[td][/td]
[td]255.255.255.248[/td]
[/tr]
[tr]
[td]xx2.xx2.98.204[/td]
[td]free[/td]
[td] ReSeller[/td]
[td][/td]
[td]NS2.[/td]
[td]255.255.255.248[/td]
[/tr]
[/table]

I am using NGINX+Apache Reverse Proxy so i checked all the nginx.conf files and all the httpd.conf files. Still nothing.

I did find this: If I do the [ip]:8080 (Apache Port) it will resolve the domain properly. I am thinking its a nginx issue.
 
I finally tracked it down and got a fix for it.


The issue was simply a issue with Varnish cache. I am sure what would have caused this. It was just happening to those IPs. You would expect it to happen on the reseller IP as well.

Here is how I fixed it:

I ran the following commands in ssh, logged in as root.
Code:
echo "action=rewrite&value=nginx" >> /usr/local/directadmin/data/task.queue

Code:
/usr/local/directadmin/dataskq d


You should see an output like this after the last line of code.

[root@webserver10 /]# echo "action=rewrite&value=nginx" >> /usr/local/directadmin/data/task.queue
[root@webserver10 /]# /usr/local/directadmin/dataskq d
Debug mode. Level 10

dataskq: command: action=rewrite&value=nginx
[root@webserver10 /]#

then I restarted nginx
Code:
service nginx restart
 
I was wrong... Did not fix it at all. Something up with the Varnish Cache causing it.

I just removed the "6081" and reset it back to "|PORT_8080|" in the following 2 files.

/usr/local/directadmin/data/templates/custom/nginx_server.conf
/usr/local/directadmin/data/templates/custom/nginx_server_sub.conf

I then redid the code above to reset everything.




I am going to have to sit down and figure out what is going on later. For now, I will just disable Varnish.
 
Having the same issue.

Varnish in front of Nginx reverse proxy setup using @zEitEr his how-to.

Everything goes alright for users on shared IP's and domains. Hence when visiting someone's owned IP address, it resolves / redirects to the first vhost on the server.

Any clues what this might cause?
 
Back
Top