Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Apache on a DHCP

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
Rinkhals
Apprentice
Apprentice
User avatar
Posts: 165
Joined: Fri May 02, 2003 12:02 pm
Location: Scotland

Apache on a DHCP

  • Quote

Post by Rinkhals » Tue May 20, 2003 9:50 pm

I have a bit of a problem running apache on my home system.

I have two machines one running gentoo and the other Debain, connected to a router/ADSL modem.

The Router acts as a DHCP server which allocates the ip adresses to the other machines.

How can I configure apache to use the ip address so obtained?

Many Thanks
Top
djnauk
Apprentice
Apprentice
User avatar
Posts: 183
Joined: Tue Feb 11, 2003 9:50 am
Location: Caerphilly, Wales, UK
Contact:
Contact djnauk
Website

  • Quote

Post by djnauk » Tue May 20, 2003 10:20 pm

by default, apache will use all ip-addresses that are pointing at the computer, 127.0.0.1 and any from the network adapters (it'll usually start with 0.0.0.0:80 in netstat, so listens on all interfaces).

if you just run it, it should display the 'welcome' page. if it doesn't what error messages are you getting?
Jonathan Wright (Technical Director, JAB Web Solutions)

UK Hosting & Reseller Hosting from JAB Web Solutions
Top
Rinkhals
Apprentice
Apprentice
User avatar
Posts: 165
Joined: Fri May 02, 2003 12:02 pm
Location: Scotland

  • Quote

Post by Rinkhals » Tue May 20, 2003 11:34 pm

I get the following error message:

Could not determine the server's full qualified domain name, using 127.0.0.1 for ServerName

Also, the error log says:

mod_unique_id: unable to gethostbyname("CovsComp.Clubhouse")

Many thanks
Top
djnauk
Apprentice
Apprentice
User avatar
Posts: 183
Joined: Tue Feb 11, 2003 9:50 am
Location: Caerphilly, Wales, UK
Contact:
Contact djnauk
Website

  • Quote

Post by djnauk » Wed May 21, 2003 9:05 am

Try disabling mod_unique_id in apache.conf. If that still doesn't work, you can force Apache to use a domain name (although you can't use name-based virtual servers then) by using the following:

Code: Select all

UseCanonicalName On
ServerName CovsComp.Clubhouse
Also, while I think about it, does CovsComp.Clubhouse reslove to an ip address? Either by /etc/hosts or by a DNS server?
Jonathan Wright (Technical Director, JAB Web Solutions)

UK Hosting & Reseller Hosting from JAB Web Solutions
Top
Rinkhals
Apprentice
Apprentice
User avatar
Posts: 165
Joined: Fri May 02, 2003 12:02 pm
Location: Scotland

  • Quote

Post by Rinkhals » Wed May 21, 2003 7:11 pm

Many thanks for your trying to help me on this......

Code: Select all

Also, while I think about it, does CovsComp.Clubhouse reslove to an ip address? Either by /etc/hosts or by a DNS server?
Only entry in /etc/hosts is '127.0.0.1 Localhost'

How do I check if the DNS Server is resolving CovsComp.Clubhouse to an IP address? I suspect that it aint....
Top
djnauk
Apprentice
Apprentice
User avatar
Posts: 183
Joined: Tue Feb 11, 2003 9:50 am
Location: Caerphilly, Wales, UK
Contact:
Contact djnauk
Website

  • Quote

Post by djnauk » Thu May 22, 2003 12:22 am

no problem.

the quickest way that i can think off is if you just ping the address (the -c 5 option limits it to 5 pings):

Code: Select all

ping -c 5 CovsComp.Clubhouse
if you getting something like

Code: Select all

jwright@kenny jwright $ ping www.djnauk.co.uk
PING kenny.djnauk.co.uk (192.168.1.1): 56 octets data
64 octets from 192.168.1.1: icmp_seq=0 ttl=64 time=0.3 ms
64 octets from 192.168.1.1: icmp_seq=1 ttl=64 time=0.1 ms
64 octets from 192.168.1.1: icmp_seq=2 ttl=64 time=0.1 ms
64 octets from 192.168.1.1: icmp_seq=3 ttl=64 time=0.1 ms
64 octets from 192.168.1.1: icmp_seq=4 ttl=64 time=0.1 ms

--- kenny.djnauk.co.uk ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.1/0.1/0.3 ms
then it's ok, but, if you get this:

Code: Select all

jwright@kenny jwright $ ping garrison.djnauk.co.uk
ping: unknown host garrison.djnauk.co.uk
then you will need to check the config's and/or the logs (/var/log/dns i think). Also, it doesn't hurt putting the name of your server in the file as will, just in case something is wrong with the dns, the server will still run: :)

Code: Select all

# /etc/hosts:  This file describes a number of hostname-to-address
#              mappings for the TCP/IP subsystem.  It is mostly
#              used at boot time, when no name servers are running.
#              On small systems, this file can be used instead of a
#              "named" name server.  Just add the names, addresses
#              and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.7 2002/11/18 19:39:22 azarah Exp $
#

127.0.0.1       localhost
192.168.1.1     kenny.djnauk.co.uk  kenny www
is what i've got...
Jonathan Wright (Technical Director, JAB Web Solutions)

UK Hosting & Reseller Hosting from JAB Web Solutions
Top
Rinkhals
Apprentice
Apprentice
User avatar
Posts: 165
Joined: Fri May 02, 2003 12:02 pm
Location: Scotland

  • Quote

Post by Rinkhals » Sun May 25, 2003 2:03 pm

Hi,

Well, I've treid a number of things which eventually Completely screwed up my debian install.

As I was having a soundcard problem on my Desktop box (which has Gentoo), and somebody recommended using doing a Knoppix CD and seeing if the soundcard worked with that: it does, but there's no way that I can see of transferring any configuration settings to the Hard Drive, so it's not a lot of use. Anyway, I took the opportunity to reinstall Debian and see if that would cure my apache DHCP problem. Predictably, it doesnt.

Just to digress: I thought gentoo was pretty wonderful, wow, that Knoppix! Just a pity there's no way of doing an ordinary install, everything from the CDROM and Ram, no way of keeping the settings.

Anyway, back to the case in hand.

I can't ping CovsComp.Clubhouse, nor can I ping Laptop.Clubhouse.

I can ping 192.168.1.254 which the router/modem which acts like a DHCP Server.

As regards the Hosts file, my DHCP Server doesn't have a name

Also, is not my IP dynamic? So there wouldn't really be any point inputting the IP and the Computer name into the /etc/hosts file as you suggest.

As regards error logs etc, Ping says 'unknown host: Laptop.Clubhouse', apache says 'could not determin the servers fully qualified domain name, using 127.0.0.1 for Servername'

Many thanks
Top
Durenunde
n00b
n00b
Posts: 26
Joined: Thu May 22, 2003 9:51 pm
Location: N.Ireland
Contact:
Contact Durenunde
Website

  • Quote

Post by Durenunde » Sun May 25, 2003 2:49 pm

because you arent using a fully qualified domain name and one thats not proper either apache I think is having a bit of trouble

change your configuration of your /etc/hosts to this if you still want to use CovsComp.Clubhouse though I would recommend using all lower case and putting something on the end like .net or .com or .org or something though you can also get yourself a free 3rd level domain from places like www.no-ip.com or www.dyndns.org .
before I give you the quote also you can force your computers to take a certain IP address I've found that if you uncomment the line in /etc/conf.d/net that reads (this will keep you using dhcp as well but it takes an IP rather than being given one and it will still take its DNS from the DHCP server
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
as well as the line
iface_eth0="dhcp"
replacing the 192.168.0.2 with whatever IP address you want to force the computer to have will mean that it will always resolve to that IP for the name that you will put in the /etc/hosts

now following the above you can put this (also do for your other comp as well
127.0.0.1 localhost
192.168.0.2 CavsComp.Clubhouse
192.168.0.3 Laptop.Clubhouse
also as a side note make sure you type the caps at the commandline whne you are typing the address or it won't find it at all. thats why I recommend making it all in lower :D

now also you'll find that it will resolve to that address now though I seriously advise getting something with a .net or something on the end

hope this helps
mmmm, pizza
Top
ninja
n00b
n00b
User avatar
Posts: 26
Joined: Wed Apr 17, 2002 11:05 am
Location: Melbourne, Australia
Contact:
Contact ninja
Website

  • Quote

Post by ninja » Tue May 27, 2003 6:04 am

I had the same problem you are having i fixed it editing the /etc/apache/conf/apache.conf file

Code: Select all

a comment = '#'

remove the comment from 'ServerName localhost'

comment out the following
#LoadModule unique_id_module   modules/mod_unique_id.so
#AddModule mod_unique_id.c

the run it and see if it works 
/etc/init.d/apache start
Top
Post Reply

9 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic