Results 1 to 7 of 7
I've recently installed Apache on a gnome workstation running RedHat 6.2. I can't start Apache. I get an error saying that Lynx can't access the startfile under localhost. I checked ...
- 03-04-2004 #1Just Joined!
- Join Date
- Mar 2004
- Location
- Edmonton, Alberta
- Posts
- 4
User and Group problem with Apache install on RH 6.2
I've recently installed Apache on a gnome workstation running RedHat 6.2. I can't start Apache. I get an error saying that Lynx can't access the startfile under localhost. I checked the Apache error log and it seems to be a Linux group problem. I'm pretty sure I need to create a user and a group and specify it in the httpd.conf file, but it doesn't seem to be working. I installed Apache as root.
When I log on as a user lesser than root, Linux doesn't recognize the apachectl command at all. (I'm new to Linux)
Can anybody walk me through what Linux is expecting in my httpd.conf file and how I go about setting up the user and group correctly?
- 03-05-2004 #2Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
Re: User and Group problem with Apache install on RH 6.2
1) which version of apache?
Originally Posted by tronsgar
2) did you compile from source, or install from RPM?
3) Exact Error message would be handy, along with command used to start it
4) relevant error listing from errorlog
Apache must be started as root, as it binds to a TCP port below 1024.
Apache will then (once started) spawn child processes under the user/group specified In your httpd.conf file.
For example, in my httpd.conf, for apache 1.3.29 under slackware 8.1, i have the following lines:
In my /etc/group file, i have a line:Code:User nobody Group nobody
and in my /etc/passwd file i have a line:Code:nobody::98:nobody
Apache works pretty much the same regardless of distro and distro version.Code:nobody:x:99:99:nobody:/:/bin/false
Jason
- 03-06-2004 #3Just Joined!
- Join Date
- Mar 2004
- Location
- Edmonton, Alberta
- Posts
- 4
I changed httpd.conf to the nobody/nobody configuration but it still doesn't work. I also changed my /etc/group and psswd files to mirror yours but it didn't seem to make any difference. This is what I get from apachectl status:
Looking up localhost.
Making HTTP connection to localhost.
Alert!: Unable to connect to remote host.
lynx: Can't access startfile http://localhost/server-status
This is what the error log message displays:
[alert] (22)Invalid argument:setgid: unable to set group id to Group 4294967295
I'm running apache version 2.0.47
Any help appreciated. I want to give Linux a whirl chance because I know it does many things better than windows, but these are the sort of problems I was afraid of. It took me all of five minutes to install Apache, MySQL and PHP on my windows box and it works perfectly.
- 03-06-2004 #4Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
Looks like apache may not be started.
You can start it using "apachectrl start".
Then check it has started, by doing running "netstat -ant | grep :80 | grep LISTEN".
If it has started ok, you will see one line like this:
Otherwise, if its not started, it wont print anything, like this:Code:user@box# netstat -ant | grep :80 | grep LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN user@box #
Any problems encountered during apache startup will proberly be in your "error_log" file.Code:user@box# netstat -ant | grep :80 | grep LISTEN user@box #
Jason
- 03-07-2004 #5Just Joined!
- Join Date
- Mar 2004
- Location
- Edmonton, Alberta
- Posts
- 4
I agree that Apache is not starting. That's my problem. Does anybody know why Apache is not starting or what the error messages I've described mean?
- 03-07-2004 #6Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
what i was trying to explain above is that "apachectrl status" wont work until after "apachectrl start".
Originally Posted by tronsgar
"apachectrl start" starts the server
"apachecrtl status" shows status information about a running server
What is the output of apachectrl start?
after an apachectrl start, are there any additional error messages in your /var/log/messages file or error_log file?
Thanks,
Jason
- 03-07-2004 #7Just Joined!
- Join Date
- Mar 2004
- Location
- Edmonton, Alberta
- Posts
- 4
Sorry if I sounded snide, I'm just a little frustrated. Ya, I've started apache using apachectl start and also apachectl graceful. Apache does not start because of the groupid error described above. The default group that appeared in my httpd.conf file was group#-1 or something close to that. Other people that have had this same problem have fixed it by changing that value to an existing group on their system, but I've tried that and it doesn't seem to work. Thanks for your help, but I'm not actually at my linux box right now so I can't really be more specific or continue with this. Maybe I'll be able to figure it out when I have time. For now I can continue developing on my windows machine.


Reply With Quote
