I have installed apache from the source with:
useradd -g apache -d /usr/apache -s /sbin/nologin apache
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
If you wonder about the home directory, it should not matter that much, because it will probably not change the behavior of apache at all.
On Debian, the default homedir for the user running apache is
/var/www (which is the default
Also, if you're on a Debian-based distrib, you should prefer using
adduser instead of
useradd which is quite low level.