Click to See Complete Forum and Search --> : Apache and RH6.2


Silent Bob
08-10-2001, 11:24 AM
I have installed Apache on RH6.2 with mod_ssl. I followed all the configuration instructions given in the mod_ssl INSTALL file (I didn't use MM this time round because it caused Apache to not start as well).

Whenever I start apache I get this [Fri Aug 10 16:19:36 2001] [alert] httpd: Could not determine the server's fully
qualified domain name, using 127.0.0.1 for ServerName
/usr/local/apache/bin/apachectl start: httpd startedand Apache is not properly started, if I do a ps -aux | grep httpd I get nothing.

Any ideas?

EDIT: forgot to mention, it's Apache 1.3.20

[ 10 August 2001: Message edited by: Silent Bob ]

The King Ant
08-10-2001, 10:08 PM
Check your error logs. From what you posted, it looks like Apache started fine. It seems like the error is from something else. So check your apache error logs.

Also, look in your httpd.conf file and make sure "ServerType" is "standalone." If it's set to "inetd," then doing a ps -aux wouldn't list any httpd instances, because apache would be starting in a per-instance way, like ftp or telnet.

SKoL
08-12-2001, 07:56 PM
Check the ServerName directive..

Set it to something else, example :


# ServerName allows you to set a host name which is sent back to clients for
# your server if it's different than the one the program would get (i.e., use
# "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The name you
# define here must be a valid DNS name for your host. If you don't understand
# this, ask your network administrator.
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address (e.g., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
# machine always knows itself by this address. If you use Apache strictly for
# local testing and development, you may use 127.0.0.1 as the server name.
#
ServerName www.foo.com (http://www.foo.com) (or something like..)

ServerName foo

Whatever you want. Just add it, and uncomment it.


(sorry, this is your apache configuration file, usually located in /installdir/apache/conf/httpd.conf)

[ 12 August 2001: Message edited by: SKoL ]

Silent Bob
08-13-2001, 04:25 AM
The server name doesn't seem to be the problem. httpd doesn't start even though apachectl says that it is.

The process ID is written to the http.pid file but the process itself doesn't exist (I checked) and when I run apachectl stop it tells me that it isn't running.

I rebuilt apache (this time with SSL and MM support) and now apache won't even pretend that it has started. I get httpd.mm.18607.sem (or a similar file) which is empty written to my logs directory and there is no sign of error_log

Thanks for the help so far

[ 13 August 2001: Message edited by: Silent Bob ]

Silent Bob
08-13-2001, 05:57 AM
I completely removed all traces of apache and started again with just an install of plain Apache (with DSO support)

I ran apachectl start and as always it reported that it was running. I got the PID from httpd.pid and ran ps -aux | grep <PID> which turned up nothing.
apachectl stop reported that the httpd wasn't running.

Fortunately an error_log was created this time round. This is what's in it:

[alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[error] (22)Invalid argument: shmctl() could not set segment #18432

I am stumped. I did the same install, following the exact same procedures on a RH 7 box a few weeks ago and everything ran according to plan.

freebsd
08-13-2001, 06:51 AM
>> ServerName www.foo.com (http://www.foo.com) (or something like..)
>> ServerName foo
>> Whatever you want. Just add it, and uncomment it.

You may invent whatever unregistered domain ServerName you want, however, you must put it in /etc/hosts file.

>> The server name doesn't seem to be the problem

You MUST set your machine hostname before doing anything else, that's the very first step you should have done. Don't even try skipping 100 essential steps ahead.

>> with just an install of plain Apache (with DSO support)

How you build it is the most important part and to troubleshoot the problem, please provide that in details.

Silent Bob
08-13-2001, 07:11 AM
When I said that ServerName wasn't the problem I meant the ServerName directive in httpd.conf (I have the machine reasonably nicely set up at this stage, hostnames and all :)).

The way I built it is as follows:
./configure --enable-shared=max
make
make install

I'm thinking that that shmctl() in the error_log is indicitive of the problem.
Is that a kernel thing?

Thanks for the help

freebsd
08-13-2001, 07:43 AM
>> The way I built it is as follows:
>> ./configure --enable-shared=max

When you build Apache with such minimal configure options, you will have to know Apache really well because you will have to manually editing httpd.conf far more than usual.
That said, a tiny misconfiguration can cause Apache refuse to start. Next time you build Apache, you should at least set a --prefix or use whatever layout you like (check your config.layout file in your src).
Yes, to enable mod_so, you just need to build one or more module as a shared module and --enable-shared=max should do it.
So what did you set for the user and group in httpd.conf? Do the user and group exists?

Silent Bob
08-13-2001, 08:37 AM
I have compared my httpd.conf to one that works on my RH 7 system. They are identical except that the RH 7 one also has mod_ssl.

The user and group are nobody.

httpd.conf shouldn't need much editing, the one for on my RH 7 system worked as-is

Silent Bob
08-14-2001, 12:00 PM
I gave up on Apache 1.3.20 and went with 1.3.12

It worked first time :)