X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpkg%2Fapache;h=19b5d040ef6ff79191e749f90a9d83b35b30e4d9;hb=84b83228f5a3e70ead5b92b517e1aa0afaeac295;hp=ab0386072976d921fcb414bb262945807eae4d3c;hpb=f3c8db3027d5dc530e1f30c88e0235975211582e;p=hvlinux.git diff --git a/stage5/pkg/apache b/stage5/pkg/apache index ab03860..19b5d04 100644 --- a/stage5/pkg/apache +++ b/stage5/pkg/apache @@ -2,35 +2,58 @@ hvconfig_pre() { + cd ${LFS_TMP}/${PACKAGE} + + cat >> config.layout << "EOF" && +# BLFS FHS layout + + prefix: /usr + exec_prefix: ${prefix} + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + libdir: ${exec_prefix}/lib + libexecdir: ${exec_prefix}/libexec/apache + mandir: ${prefix}/share/man + sysconfdir: /etc/apache + datadir: /srv/www + installbuilddir: ${libexecdir}/build + errordir: ${datadir}/error + iconsdir: ${datadir}/icons + htdocsdir: ${datadir}/htdocs + manualdir: ${datadir}/manual + cgidir: ${datadir}/cgi-bin + includedir: ${prefix}/include/apache + localstatedir: ${datadir} + runtimedir: /var/run + logfiledir: /var/log/apache + proxycachedir: /var/cache/apache/proxy + +EOF + groupadd -f ${APACHE_USER} hv_useradd -c WebServer -d /dev/null -g ${APACHE_USER} -s /bin/false \ ${APACHE_USER} CONFIGURE_OPTS=" \ - ${CONFIGURE_OPTS} \ --enable-layout=FHS \ --enable-mods-shared=all \ --enable-ssl \ --with-z" - # --enable-rewrite \ - # --enable-deflate \ - # --enable-dav \ } hvbuild_post() { - # There's a problem with the ISAPI DSO module caused from compiling with - # GCC-4.1.2. - # Commenting out the module from the configuration: - if grep "LoadModule isapi_module" /etc/apache/httpd.conf \ - 1> /dev/null 2>&1; then - sed -i -e "s/^LoadModule isapi_module/# &/" /etc/apache/httpd.conf - fi + chown -v root:root /usr/bin/{apxs,dbmmanage} \ + /usr/sbin/{apachectl,envvars{,-std}} \ + /usr/libexec/apache/httpd.exp \ + /usr/share/man/man1/{ab,apxs,dbmmanage,ht{dbm,digest,passwd,txt2dbm},logresolve}.1 \ + /usr/share/man/man8/{apachectl,htcacheclean,httpd,rotatelogs,suexec}.8 && + + sed -i -e "s!^\(DocumentRoot\) .*!\1 /srv/www/htdocs!" /etc/apache/httpd.conf # Modifying the listening port if an alternate one is specified. if [ -n "${HTTPD_PORT}" ]; then - if ! grep "Listen ${HTTPD_PORT}" /etc/apache/httpd.conf \ - 1> /dev/null 2>&1; then + if ! grep -q "Listen ${HTTPD_PORT}" /etc/apache/httpd.conf; then # Adding alternate port to default port of 80 sed -i -e "s%\(Listen 80\)%\1\nListen ${HTTPD_PORT}%" \ /etc/apache/httpd.conf @@ -104,13 +127,13 @@ EOF sed -i -e "s!^!\n Include /etc/apache/ssl/ssl.conf!" /etc/apache/httpd.conf mkdir -p /srv/www/htdocs/ssl - chown apache:apache /srv/www/htdocs/ssl - sed -i -e "s!^DocumentRoot .*!DocumentRoot /srv/www/htdocs/ssl!" /etc/apache/ssl/ssl.conf sed -i -e "s!^ServerName .*:443!ServerName www.${DOMAIN}:443!" /etc/apache/ssl/ssl.conf sed -i -e "s!^ServerAdmin .*!ServerAdmin webmaster@${DOMAIN}!" /etc/apache/ssl/ssl.conf sed -i -e "s!/etc/apache!/etc/apache/ssl!" /etc/apache/ssl/ssl.conf + chown -v -R ${APACHE_USER}:${APACHE_USER} /srv/www + # Bootscript install -v -m740 ${SCRDIR}/bootscripts/apache /etc/rc.d/init.d