View Single Post
  #1   (View Single Post)  
Old 19th May 2008
vitiate vitiate is offline
New User
 
Join Date: May 2008
Posts: 2
Default Hostname / web hosting issues

Hi there,

I've just delved into FreeBSD from the Linux world over the past week, and I've set up an Apache2 server. The server sits behind a router on my home network, and serves the internet through port forwarding. My router is set up as a DCHP server, and serves the home clients with dynamic IP addresses.

I've set a static IP address for the server, and from a web browser on my server machine (Phobos) I can access the web content through the host name, and server IP (http://phobos and http://192.168.2.10). HOWEVER, from other computers on the network, I can only access the web content through my servers IP.

Obviously, I think this is related to resolving hostnames from my XP machines so my attension is currently drawn to the /etc/hosts file on the FreeBSD server. The problem is also present when using any other piece of software (Such as PuTTy) on the the clients to access the server through the host name, and is not a browser related issue.

Questions,

1) Am I doing something that shouts out as being obviously wrong?
2) My network has no domain, in hosts file listed as "phobos" not "phobos.my.domain" = same in rc.conf. Is the relevant/good practice Or am I doing something wrong/looking in the wrong direction?

Please help guys! I'm happy to provide file information, but currently unable todo so whilst posting.

Many thanks.

PS:

etc/hosts

# $FreeBSD: src/etc/hosts,v 1.16 2003/01/28 21:29:23 dbaker Exp $
#
# Host Database
#
# This file should contain the addresses and aliases for local hosts that
# share this file. Replace 'my.domain' below with the domainname of your
# machine.
#
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
::1 localhost
127.0.0.1 localhost
192.168.2.10 phobos
#
# Imaginary network.
#10.0.0.2 myname.my.domain myname
#10.0.0.3 myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP networks for
# private nets which will never be connected to the Internet:
#
# 10.0.0.0 - 10.255.255.255
# 172.16.0.0 - 172.31.255.255
# 192.168.0.0 - 192.168.255.255
#
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers. Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#

etc/rc.conf


# -- sysinstall generated deltas -- # Sat May 17 14:17:48 2008
# Created: Sat May 17 14:17:48 2008
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
keymap="uk.iso"
# -- sysinstall generated deltas -- # Sat May 17 15:20:35 2008
moused_enable="YES"
# -- sysinstall generated deltas -- # Sat May 17 15:24:39 2008
ifconfig_rl0="inet 192.168.2.10 netmask 255.255.255.0"
defaultrouter="192.168.2.1"
ipv6_enable="YES"
hostname="phobos"
# -- sysinstall generated deltas -- # Sat May 17 14:34:14 2008
sshd_enable="YES"
gnome_enable="YES"
apache22_enable="YES"

and nsswitch.conf:

#
# nsswitch.conf(5) - name service switch configuration file
# $FreeBSD: src/etc/nsswitch.conf,v 1.1 2006/05/03 15:14:47 ume Exp $
#
group: compat
group_compat: nis
hosts: files dns
networks: files
passwd: compat
passwd_compat: nis
shells: files
services: compat
services_compat: nis
protocols: files
rpc: files


Running FreeBSD 7.

Last edited by vitiate; 19th May 2008 at 12:12 PM.
Reply With Quote