Help with apache2

A

Anonymous

Guest
I am trying to setup apache2 without having to give it a domain name. All I have done so far was install it, no configuration.
When I start it I get the message:
Code:
httpd: apr_sockaddr_info_get() failed for
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Mon Mr 09 23:10:27 2009] [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter

And then when I try to test the server using my local network address in a browser the browser tells me:

Failed to Connect

Firefox can't establish a connection to the server at 192.168.2.3.

Though the site seems valid, the browser was unable to establish a connection.
 
Nope, 'connection refused'. I changed the config file so that my ip address is the domain name and did 'kldload accf_http'. Now when I start apache I get no error messages, in fact I get no message whatsoever. Still can't connect to the server.
 
another thing i noticed was that when i stop httpd it tells me 'httpd (no pid file) not running' as if its not even starting..
 
How do you start your apache server? Using the apachectl command or the rc script in /usr/local/etc/rc.d?

What is the output of "ps ax | grep httpd" when you have started the server?(ie does the server actually start?)
 
I've been using apachectl.
after 'apachectl' , 'ps ax | grep httpd' returns
4123 v0 R+ 0:00.00 grep httpd

In a linux forum I saw the following response to a similar problem:
I think that I had the same problem as you and discovered the way to fix it. Basically within /etc/default/apache2 the variable NO_START was set to 1, change this to 0 and then /etc/init.d/apache2 will create the /var/run/apache2 directory and be able to start. Hope this helps.

But I have no idea where the corresponding file to /etc/default/apache2 would be in freebsd
 
mickeyharvey70 said:
I've been using apachectl.
after 'apachectl' , 'ps ax | grep httpd' returns
4123 v0 R+ 0:00.00 grep httpd

In a linux forum I saw the following response to a similar problem:


But I have no idea where the corresponding file to /etc/default/apache2 would be in freebsd

First of all that indicates that the server isn't started at all, so it's no surprise that you can't connect to it. Also start using the rc script instead of the apachectl program.

Edit /etc/rc.conf and set (as documented in the rc script) apache22_enable="YES", and then run /usr/local/etc/rc.d/apache22 configtest. If you get a "Syntax OK", then start the server using the same script.
 
thanks killa.
glinko, that doesn't work, tried it already.
 
mickeyharvey70 said:
glinko, that doesn't work, tried it already.

Exactly what doesn't work? You do have a rc.conf file? you do have the apache22 script in the rc.d directory? you have the apacheXX_enable in your rc.conf file?
 
What do you get running # /usr/local/etc/rc.d/apache22 forcestart?
Can you see something relevant in /var/log/httpd-error.log after running the command?
 
Tried that, it says is starting, but when I check it's not running.

Every time I try starting it, the following error shows up int the error log. (dont know what's up with the time, its way off)

Code:
[Tue Mar 10 08:16:44 2009] [warn] Init: Session Cache is not configured [hint: SLSessionCache]
[Tue Mar 10 08:16:44 2009] [alert] (EAI 8)hostname nor servname provided, or not 
known: mod_unique_id: unable to find IPv4 address of ""
Configuration Failed
 
the output of host name is blank line.
I just added that to rc.conf and restarted apache, same error in the error log though
 
I you just added something to /etc/rc.conf, do a shutdown now, press enter when asked about the shell and type exit.
 
if you ask me, yes

[Tue Mar 10 08:16:44 2009] [alert] (EAI 8)hostname nor servname provided, or not
known: mod_unique_id: [red]unable to find IPv4 address of ""[/red]
Configuration Failed
 
Back
Top