From cea82c3460ebcbf4506694b606057c2a7f62d271 Mon Sep 17 00:00:00 2001 From: Amy Fong Date: Fri, 11 Apr 2014 09:48:52 -0400 Subject: Apache2 changes Configure apache's ServerName - modify apache2's configuration file for ServerName to 127.0.0.1:80 In 2.4.7, add symlinks for htdocs and log directory to maintain backward compat with older versions. Signed-off-by: Amy Fong --- .../recipes-extended/apache2/apache2_2.4.7.bbappend | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 meta-openstack/recipes-extended/apache2/apache2_2.4.7.bbappend (limited to 'meta-openstack') diff --git a/meta-openstack/recipes-extended/apache2/apache2_2.4.7.bbappend b/meta-openstack/recipes-extended/apache2/apache2_2.4.7.bbappend new file mode 100644 index 0000000..7aca867 --- /dev/null +++ b/meta-openstack/recipes-extended/apache2/apache2_2.4.7.bbappend @@ -0,0 +1,15 @@ +INC := "${@int(PRINC) + 1}" + +do_install_append() { + sed -i -e 's/#ServerName.*$/ServerName 127.0.0.1:80/' ${D}${sysconfdir}/apache2/httpd.conf + + # default layout for htdocsdir in 2.4.7 is different, create the following for + # backward compatibility reasons + + mkdir -p ${D}${datadir}/${BPN}/default-site + ln -sf ../htdocs ${D}${datadir}/${BPN}/default-site/htdocs + + sed -i '30i if [ ! -e /var/log/apache2 ]; then ln -sf /var/apache2/logs/ /var/log/apache2; fi' ${D}/etc/init.d/apache2 +} + +FILES_${PN} += "${datadir}/${BPN}/default-site" -- cgit v1.2.3-54-g00ecf