Forums

Skip to content

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

Apache Startup Problem

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
emollon
n00b
n00b
User avatar
Posts: 49
Joined: Tue Jan 24, 2006 12:35 am
Location: Sant Just Desvern

Apache Startup Problem

  • Quote

Post by emollon » Wed Oct 31, 2007 4:57 pm

Hi, I´ve installed an Apache2 webserver and everything worked fine but when i try to start it it doesn´t start succefully.... then i try to give a

Code: Select all

/etc/init.d/apache2 status
and it gives me this ouput

Code: Select all

migentoo etc # /etc/init.d/apache2 status
 * status:  stopped

Looking up localhost
Making HTTP connection to localhost
socket failed: family 10 addr ::1 port 80.
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/server-status
Anyone know why i got this message? should i reemerge it?
building my media center with gentoo and boxee
Top
RayDude
Advocate
Advocate
User avatar
Posts: 2195
Joined: Sat May 29, 2004 6:11 am
Location: San Jose, CA

Re: Apache Startup Problem

  • Quote

Post by RayDude » Wed Oct 31, 2007 6:01 pm

emollon wrote:Hi, I´ve installed an Apache2 webserver and everything worked fine but when i try to start it it doesn´t start succefully.... then i try to give a

Code: Select all

/etc/init.d/apache2 status
and it gives me this ouput

Code: Select all

migentoo etc # /etc/init.d/apache2 status
 * status:  stopped

Looking up localhost
Making HTTP connection to localhost
socket failed: family 10 addr ::1 port 80.
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/server-status
Anyone know why i got this message? should i reemerge it?
First off, what does it say when you try: `/etc/init.d/apache2 start`?

What does the error log say?

Code: Select all

tail /var/log/apache2/error_log
That should give you some clues as to the problem.

It sounds like your hosts file might not be correct. You must have Fully Qualified Domain Name specified in /etc/hosts. This is a bit tricky if you are using DHCP.

Please reply with the info I asked for, hopefully there will be more clues.

Raydude
Some day there will only be free software.
Top
emollon
n00b
n00b
User avatar
Posts: 49
Joined: Tue Jan 24, 2006 12:35 am
Location: Sant Just Desvern

  • Quote

Post by emollon » Fri Nov 02, 2007 10:18 am

Hello, thanks for you reply... actually this machine it comes from a virtual machine in a vmware.

here is my /etc/hosts

Code: Select all


# IPv4 and IPv6 localhost aliases
127.0.0.1       migentoo localhost
::1     localhost

#
then i try to startup the apache service and gives me this warm

Code: Select all

migentoo ~ # /etc/init.d/apache2 start
 * Starting apache2 ...                                                   [ !! ]
migentoo ~ # /etc/init.d/apache2 status
 * status:  stopped

Looking up localhost
Making HTTP connection to localhost
socket failed: family 10 addr ::1 port 80.
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/server-status
migentoo ~ #

also here is my error log

Code: Select all


migentoo ~ # tail /var/log/apache2/error_log
[Tue Oct 30 19:10:41 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Oct 30 19:10:41 2007] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "migentoo"
Configuration Failed
[Tue Oct 30 20:05:13 2007] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Oct 30 20:05:13 2007] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "migentoo"
Configuration Failed
this is because i gived the ip adress with this sentence?

Code: Select all

ifconfig eth0 192.168.126.128 broadcast 192.168.126.255 netmask 255.255.255.0 up
witch is the file to edit to give the static ip adress?

thanks for your help.
building my media center with gentoo and boxee
Top
RayDude
Advocate
Advocate
User avatar
Posts: 2195
Joined: Sat May 29, 2004 6:11 am
Location: San Jose, CA

  • Quote

Post by RayDude » Fri Nov 02, 2007 6:39 pm

If you're running a fixed IP (version 4 only) then you should change your hosts file to look like this:

Code: Select all

192.168.126.128 migentoo.<your_domain>.<ext> migentoo
# IPv4 localhost aliases
127.0.0.1       localhost
So it may look like this:

Code: Select all

192.168.126.128 migentoo.org migentoo
# IPv4 and IPv6 localhost aliases
127.0.0.1       localhost
I think you must use a fully qualified domain name in your hosts file and it must match the one in httpd.conf next to the "ServerName" keyword.

I haven't tried to get it working without FQDN.

To do it with dhcp I think it would be like this (but am not sure)

Code: Select all

# IPv4 and IPv6 localhost aliases
127.0.0.1       migentoo.org localhost
I'm not positive that will work mind you, you need to google FQDN syntax for hosts files.

Please also note that all this information must match the rest of the data in /etc/conf.d/net and /etc/conf.d/hostname and /etc/conf.d/dnsdomainname (if you have one, I think that's now gone).

Also remember /etc/resolve.conf must be correct...

I think this is why apache won't start.

Raydude

PS as for where to specify fixed IP:

/etc/conf.d/net:

Code: Select all

config_eth0=( "192.168.0.1/24" )
routes_eth0=("default via 192.168.0.254")
Note: these are my IPs, yours are different.
Some day there will only be free software.
Top
Post Reply

4 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