Where are my sites hosted?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Where are my sites hosted?
# 1  
Old 12-01-2009
Where are my sites hosted?

I have 5 public websites (2 different datacenters)
1. production datacenter
2. Backup datacenter.

I have a global site selector which will load balance the site based on availability and load. I would like to have a script that can tell me exactly where my sites are in 2 columns.

example....

www.site1.com 10.1.1.1 (public IPs of course)
www.site2.com 172.16.0.0 (public IPs of course)

Thanks in advance for your help.

I'm using ubuntu 9.10

Last edited by kmaq7621; 12-01-2009 at 11:08 AM.. Reason: Removed automatic url tags.
# 2  
Old 12-01-2009
hits: arrange the result with nslookup

Code:
nslookup www.site1.com

# 3  
Old 12-02-2009
figured it out.

#!/bin/bash
# where_are_you.sh
#do a dig against the public DNS servers and spit out the current IP of the sites.
array=( www.site1.com
www.site2.com
www.site3.com
)

for i in "${array[@]}"
do
dig @4.2.2.2 $i a | grep -v ';' |grep $i | awk '{print $5," "$1}'
done
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Ldap connection - showstopper after hosted

Hi.. I have very limited knowledge on LDAP and its configuration and but I have been trying to figure out one issue that takes place when I am running the program that is written in php, but so far its unsuccessful. The server, I am working on is ldap server, which is running on Apache. After... (1 Reply)
Discussion started by: GomathiUoM
1 Replies

2. UNIX for Beginners Questions & Answers

Remoute hosted UNIX/Linux Machine Free

Hi Comrades, I am interested if there is the global internet network I can find free access to the Linux or unix server to create the own account to have some practice. Thanks a lot for your advice and comments. BR, Dembi (2 Replies)
Discussion started by: Dembi
2 Replies

3. IP Networking

Unable to access web application hosted in same network

All, I have various web applications hosted in a client network. These web apps are accessed through a Apache web server. We have deployed a new web application server and it is not serviced through the Apache web server. So i am unable to access this applications. But i am able to access... (3 Replies)
Discussion started by: vel4ever
3 Replies

4. Linux

Routing via several interfaces for hosted virtual machines

My setup consists of a hardware node, which hosts several virtual machines (OpenVZ, to be precise). The hardware node has two network interfaces (<ifA>, <ifB>) connected to different subnets (<networkA>, <networkB>). I want to route the traffic of certain VEs over <ifB> while routing the other VEs... (0 Replies)
Discussion started by: bakunin
0 Replies

5. UNIX for Dummies Questions & Answers

Accessing UNIX hosted web site remotely

Hi everyone- I'm relatively new to UNIX (Primarily Oracle background), wondering if anyone can help me. I did not configure Oracle Database Control (Web-Based admin interface) on the Database Server (HP-UX), however it is running and the URL is configured with an internal IP, which users have... (4 Replies)
Discussion started by: campbellg
4 Replies

6. HP-UX

to stop the website hosted in apache ux server

Hi, we have some websites in ux servers and need to stop those websites i.e when users try to acess those websites they should not able to see those websites. we have to ideas one is .htaccess. from this we can redirect to existing 404page. and not sure if we rediredt to non- exixting page in... (1 Reply)
Discussion started by: kishan
1 Replies

7. IP Networking

Accessing a FTP Server hosted on Linux

We have set-up a FTP server on a Linux machine, which sits behind a firewall. Most users outside our firewall can access it, but one user in particular cannot. I assume it has something to do with their firewall rules. It appears that they can connect with no problem but the server does not grant... (1 Reply)
Discussion started by: Breen
1 Replies

8. Programming

Writing a .NET service to be Hosted in UNIX

Has anyone here written an MS compatible .NET service that is hosted and served from a UNIX server instead of a W2K server? I love programming and writing .NET services with Visual Studio.NET and C#, but there is a fundamental problem --the Win2k server itself. It is not near as reliable as Sun... (0 Replies)
Discussion started by: yeslekmc
0 Replies
Login or Register to Ask a Question