LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 11-27-2006, 07:07 AM   #1
mindhacker
LQ Newbie
 
Registered: Nov 2006
Posts: 5

Rep: Reputation: 0
web hosting with an internal and external ip address


hi

I have a red hat enterprise server and i'm running apache on it. This machine has an internal ip which is 192.168.1.5. I have another server on which i have configured the subdomain which is test@m.co.in which is pointing to an external ip address. The external ip address is configured on the firewall and any requests to that ip is routed to the internal ip of that server.

when i host the site in this machine, i am able to access this site with the subdomain from outside our office, but not able to use the same domain name to access within the office. within the office i can use only the internal ip address.

can someone tell me how to configure the subdomain so that i can access the website both internally and externally using the same sub domain name..

thanks
 
Old 11-28-2006, 01:18 AM   #2
igorc
Member
 
Registered: May 2005
Location: Sydney, Australia
Distribution: Ubuntu 5.04, Debian 3.1
Posts: 74

Rep: Reputation: 15
Hi,

It looks like your DNS is not working locally. You can try the following:

1) Put this line at /etc/resolv.conf
domain your_subdomain

2) Put this line in /etc/hosts
server_ip_address servername.your_subdomain servername

3) The line for hosts in /etc/nsswitch.conf should look like this
hosts: files dns

You should do this for every client on the local network. Another possible solution would be to configure your own DNS server.
 
Old 11-28-2006, 05:59 AM   #3
mindhacker
LQ Newbie
 
Registered: Nov 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Hi Igor,

Tried what you said, but not going through. Could you tell me the alternative?
 
Old 11-28-2006, 06:03 AM   #4
mindhacker
LQ Newbie
 
Registered: Nov 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Hi Igor,

Im able to ping the subdomain name and it goes to the internal ip server. but when i type the address in the browser, it doesnt go through
 
Old 11-28-2006, 06:18 AM   #5
igorc
Member
 
Registered: May 2005
Location: Sydney, Australia
Distribution: Ubuntu 5.04, Debian 3.1
Posts: 74

Rep: Reputation: 15
Hi,

Could you please send those 3 files I mentioned above and the error you get from the browser?
Also try modifying the line in /etc/resolv.conf like this:

server_ip_address your_subdomain servername

With the previous setting it should work if you type http://servername.test@m.co.in/ in your browser.

Last edited by igorc; 11-28-2006 at 07:17 AM.
 
Old 11-28-2006, 08:00 AM   #6
mindhacker
LQ Newbie
 
Registered: Nov 2006
Posts: 5

Original Poster
Rep: Reputation: 0
here are the files contents

resolve.conf
; generated by /sbin/dhclient-script
search localdomain
nameserver 192.168.1.4
nameserver 203.145.184.13
nameserver 202.56.250.5
domain chn01.maveric.co.in

hosts
127.0.0.1 localhost.localdomain groundzero
192.168.1.5 groundzero.chn01.maveric.co.in groundzero
61.247.252.51 groundzero.chn01.maveric.co.in groundzero

nsswitch
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# nisplus or nis+ Use NIS+ (NIS version 3)
# nis or yp Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the local database (.db) files
# compat Use NIS on compat mode
# hesiod Use Hesiod for user lookups
# [NOTFOUND=return] Stop searching if not found so far
#

# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
#
# Example:
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis

passwd: files
shadow: files
group: files

#hosts: db files nisplus nis dns
hosts: files dns
# Example - obey only what nisplus tells us...
#services: nisplus [NOTFOUND=return] files
#networks: nisplus [NOTFOUND=return] files
#protocols: nisplus [NOTFOUND=return] files
#rpc: nisplus [NOTFOUND=return] files
#ethers: nisplus [NOTFOUND=return] files
#netmasks: nisplus [NOTFOUND=return] files

bootparams: nisplus [NOTFOUND=return] files

ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files

netgroup: files

publickey: nisplus

automount: files
aliases: files nisplus
 
Old 11-28-2006, 08:46 AM   #7
igorc
Member
 
Registered: May 2005
Location: Sydney, Australia
Distribution: Ubuntu 5.04, Debian 3.1
Posts: 74

Rep: Reputation: 15
Hi,

You have to properly configure the DNS server you are running on 192.168.1.4. There is a DNS tutorial in the Tutorials section on this page so you can look at it or google for some other.
Sorry I couldn't help you more.
 
Old 11-28-2006, 10:38 PM   #8
mindhacker
LQ Newbie
 
Registered: Nov 2006
Posts: 5

Original Poster
Rep: Reputation: 0
thanks igor.. i have managed to do it at the firewall itself.. thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Web Hosting Provider Verizon Business Expands Managed Hosting ... LXer Syndicated Linux News 0 09-17-2006 07:21 AM
LXer: Web Hosting Provider Zen Internet Offer Linux Hosting Trial for 1 ... LXer Syndicated Linux News 0 04-20-2006 10:33 PM
Detecting the external IP address of an internal network: JohnLocke Linux - Newbie 17 07-22-2004 05:08 PM
Free web based control panel for web hosting? mooman_fl Linux - Software 0 06-18-2004 06:16 PM
Web Hosting on RH9 via ADSL from internal network?? shearder Linux - Networking 1 10-20-2003 02:19 PM


All times are GMT -5. The time now is 07:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration