Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Problems with default apache configuration [SOLVED]

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
andersas
n00b
n00b
Posts: 11
Joined: Sat May 09, 2009 7:19 pm

Problems with default apache configuration [SOLVED]

  • Quote

Post by andersas » Sat May 09, 2009 7:38 pm

Hi

I'm about to create a small website, and would like to have Apache, PHP and MySQL
running on my laptop to test my scripts before uploading to the world wide web.

Installing PHP, MySQL and Apache seems to work without any problems,
however, when i run

Code: Select all

localhost ~# /etc/init.d/apache2 start ; echo $?
i get "1" as a response, indicating failure, and apache is nowhere to be found in the process list,
and nothing is listening on port 80.

I have not edited anything in any configuration file after the installation.
Adding entries to httpd.conf like DocumentRoot, Listen, ServerName etc does not solve the problem.
Neither does

Code: Select all

localhost ~# emerge --config [apache|mysql|php]
From all guides that I can find on the internet, Apache ought to be able to at least start
after a clean installation through emerge.

Does anyone have an idea what might be the cause of this problem?

Anders Søndergaard
Last edited by andersas on Sat May 09, 2009 8:59 pm, edited 1 time in total.
Top
Ch00k
n00b
n00b
User avatar
Posts: 55
Joined: Sat May 02, 2009 1:27 am

  • Quote

Post by Ch00k » Sat May 09, 2009 8:12 pm

Does /var/log/messages or /var/log/httpd/error.log say anything when you attempt to start Apache?
Top
andersas
n00b
n00b
Posts: 11
Joined: Sat May 09, 2009 7:19 pm

  • Quote

Post by andersas » Sat May 09, 2009 8:35 pm

Ch00k wrote:Does /var/log/messages or /var/log/httpd/error.log say anything when you attempt to start Apache?
From /var/log/messages:

Code: Select all

May  9 22:29:15 localhost rc-scripts: WARNING:  netmount is scheduled to start when net.eth0 has started.
May  9 22:29:15 localhost rc-scripts: WARNING:  apache2 is scheduled to start when net.eth0 has started.
Note that I run on wireless, and eth0 is thus not started. However, it gives the same message when I
ifconfig eth0 up + ifconfig eth0 10.0.0.3.

There is no httpd directory, although apache2 does exist and contains an empty error log:

Code: Select all

(nothing is noted down when starting apache).
Top
Sven Vermeulen
Retired Dev
Retired Dev
User avatar
Posts: 1345
Joined: Thu Aug 29, 2002 8:10 am
Location: Mechelen, Belgium
Contact:
Contact Sven Vermeulen
Website

  • Quote

Post by Sven Vermeulen » Sat May 09, 2009 8:44 pm

In /etc/conf.d/rc, set RC_NET_STRICT_CHECKING to "lo" so that the net.eth0 script doesn't need to be up (it's the script which is checked, not the interface).
Please add "[solved]" to the initial topic title when it is solved.
Top
andersas
n00b
n00b
Posts: 11
Joined: Sat May 09, 2009 7:19 pm

  • Quote

Post by andersas » Sat May 09, 2009 8:53 pm

Sven Vermeulen wrote:In /etc/conf.d/rc, set RC_NET_STRICT_CHECKING to "lo" so that the net.eth0 script doesn't need to be up (it's the script which is checked, not the interface).
rc had RC_NET_STRICT_CHECKING="no", setting it to "lo" and running the apache2 startup script yields

Code: Select all

localhost conf.d # /etc/init.d/apache2 start
 * Caching service dependencies ...                                       [ ok ]
 * Mounting network filesystems ...                                       [ ok ]
 * Starting apache2 ...
apache2: apr_sockaddr_info_get() failed for localhost
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName                  
And

Code: Select all

localhost ~# apache2ctl fullstatus

Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost/server-status
Apache (or httpd) is still not in the process list, but apache2ctl fullstatus no longer
tells me that Apache is not running. I cannot reach http://localhost/ from a browser.
Last edited by andersas on Sat May 09, 2009 9:03 pm, edited 1 time in total.
Top
andersas
n00b
n00b
Posts: 11
Joined: Sat May 09, 2009 7:19 pm

  • Quote

Post by andersas » Sat May 09, 2009 8:58 pm

update:

After putting a ServerName into httpd.conf, Apache gave an error message
about it not being able to find an ip address of "localhost". After fixing my broken /etc/hosts
Apache runs without problems.

Thank you very much for the help! Apparantly, editing /etc/conf.d/rc did the trick.
It looks like I need to study the workings of the /etc/init.d & conf.d a little more careful.
(I come from Slackware land :-)

Again, Thank you very much for your help!

Anders Søndergaard
Top
Post Reply

6 posts • Page 1 of 1

Return to “Other Things Gentoo”

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