I removed user and group related to apache, (preinstalled with apache from RPM).
I'm in the process of installing Apache HTTPD from binary source "tar.gz"
- Download httpd-2.4.12.tar.gz
- Extrat tar zxvf /.../httpd-2.4.12.tar.gz -C /usr/local/
- Create link
ln -s /usr/local/httpd-2.4.12 /usr/local/httpd
- Installed apr-1.5.2.tar.gz and apr-util-1.5.4.tar.gz (because is needed)
#./configure --prefix=/usr/local/httpd --with-included-apr --with-included-apr-util -with-pcre=/usr/local/pcre --with-z=/usr/local/zlib # make # make install
So far there were no problems...
Later after editing
/usr/local/httpd/conf/httpd.conf and running the server
/usr/local/httpd/bin/apachectl, it works perfectly...
Now, I want to create
group for my Apache directory /usr/local/httpd
Do I need a system account, e.g.,
useradd -r -s /sbin/nologin apache?
I want to put my html files in:
/usr/local/Html (for example), editing in httpd.conf file DocumentRoot and < Directory "usr/local/Html">
What user must be used, root or apache, for my dirs:?
chown -hvR apache: /usr/local/httpd chown -hvR apache: /usr/local/Html
What and how the permissions must be assigned to the owner with
chmod -R 750 /usr/local/Html
chmod -R 775 /usr/local/Html/
PS: I was reading (Not strictly following) http://www.linuxfromscratch.org/blfs/view/svn/server/apache.html
I have problems!
# useradd -g root -r -c "Apache User" -s /sbin/nologin apache # chown -hvR apache:root /usr/local/httpd/
Using (there is no problem)
# /usr/local/httpd/bin/apachectl #
but trying to use the recently created
apache user, I have:
# /bin/su -p -s /bin/sh apache /usr/local/httpd/bin/apachectl start (13)Permission denied: AH00072: make_sock: could not bind to address [::]:80 (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down AH00015: Unable to open logs #