logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Trouble starting apache as sudo
Author
hopsj



Joined: 05 Nov 2014
Posts: 5
Location: USA, Denver

PostPosted: Wed 31 Dec '14 3:59    Post subject: Trouble starting apache as sudo Reply with quote

Apache 2.2.15
Red Hat Enterprise Linux Server release 6.5 (Santiago)

Hello all. I've managed to get an apache configuration up and running on test ports 8080 and 8443. All is well. I'm ready to launch the site for production on ports 80 and 443. I've copied the configuration file and change the "Listen" directives and VirtualHost sections from 8080/8443 to 80/443. No other changes. The only difference is that I use sudo to launch apachectl to get permissions for the port numbers. In this case, apache quits immediately with no output to the console, but the error log indicates:

Code:

[alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive


I've single, double, and triple checked the username in the 'User' directive. I've even tried using the numeric uid itself with no luck.

Any thoughts or pointers on this?

Thanks.

P.S. I get the same behavior if I attempt to launch apachectl with sudo for the original configuration file (on port 8080/8443) [/code]
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Thu 01 Jan '15 23:58    Post subject: Reply with quote

I don't konw the default apache config from CentOS, but there are the directives User and Group. These you need to change to www or www-data or whatever user is default on CentOS for apache.
It seems that the user that is set in this directive is not in the /etc/passwd file.
Back to top


Reply to topic   Topic: Trouble starting apache as sudo View previous topic :: View next topic
Post new topic   Forum Index -> Apache