DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS Hosting DraconianTimes Off-Topic 3 29th September 2009 11:01 PM
Hosting a webpage for free in internet. bsdnewbie999 Off-Topic 7 12th April 2009 02:38 PM
open source web hosting control panel's crayoxide General software and network 2 28th September 2008 11:42 PM
Hostname problem, and others gaeilgeboy FreeBSD General 3 7th July 2008 11:30 PM
KVM issues lil_elvis2000 FreeBSD General 5 9th June 2008 07:55 PM


All times are GMT. The time now is 07:33 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick