Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just 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?

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284

    Re: User and Group problem with Apache install on RH 6.2

    Quote Originally Posted by tronsgar
    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?
    1) which version of apache?
    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:
    Code:
    User nobody
    Group nobody
    In my /etc/group file, i have a line:
    Code:
    nobody::98:nobody
    and in my /etc/passwd file i have a line:
    Code:
    nobody:x:99:99:nobody:/:/bin/false
    Apache works pretty much the same regardless of distro and distro version.

    Jason

  3. #3
    Just 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.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux 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:

    Code:
    user@box# netstat -ant | grep :80 | grep LISTEN
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN
    user@box #
    Otherwise, if its not started, it wont print anything, like this:
    Code:
    user@box# netstat -ant | grep :80 | grep LISTEN
    user@box #
    Any problems encountered during apache startup will proberly be in your "error_log" file.

    Jason

  6. #5
    Just 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?

  7. #6
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    Quote Originally Posted by tronsgar
    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?
    what i was trying to explain above is that "apachectrl status" wont work until after "apachectrl start".

    "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

  8. #7
    Just 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •