Fixes running horizon on fedora 18 and above
Fixes bug: 1167066 Summary: 1. Starting with fedora 18 the httpd.conf has <Directory /> AllowOverride none Require all denied </Directory> which requires you to explicitly permit access to web content directories in other <Directory> blocks 2. Install nodejs on fedora 18 and above Change-Id: I487a7a74bad6627d32c1081dcbe48630a704a106
This commit is contained in:
parent
3927fa76d2
commit
627d9c77e5
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<Directory %HORIZON_DIR%/>
|
<Directory %HORIZON_DIR%/>
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
|
%HORIZON_REQUIRE%
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
allow from all
|
allow from all
|
||||||
|
11
lib/horizon
11
lib/horizon
@ -102,6 +102,7 @@ function init_horizon() {
|
|||||||
sudo mkdir -p $HORIZON_DIR/.blackhole
|
sudo mkdir -p $HORIZON_DIR/.blackhole
|
||||||
|
|
||||||
|
|
||||||
|
HORIZON_REQUIRE=''
|
||||||
if is_ubuntu; then
|
if is_ubuntu; then
|
||||||
APACHE_NAME=apache2
|
APACHE_NAME=apache2
|
||||||
APACHE_CONF=sites-available/horizon
|
APACHE_CONF=sites-available/horizon
|
||||||
@ -115,6 +116,12 @@ function init_horizon() {
|
|||||||
elif is_fedora; then
|
elif is_fedora; then
|
||||||
APACHE_NAME=httpd
|
APACHE_NAME=httpd
|
||||||
APACHE_CONF=conf.d/horizon.conf
|
APACHE_CONF=conf.d/horizon.conf
|
||||||
|
|
||||||
|
if [[ "$os_RELEASE" -ge "18" ]]; then
|
||||||
|
# fedora 18 has Require all denied in its httpd.conf
|
||||||
|
# and requires explicit Require all granted
|
||||||
|
HORIZON_REQUIRE='Require all granted'
|
||||||
|
fi
|
||||||
sudo sed '/^Listen/s/^.*$/Listen 0.0.0.0:80/' -i /etc/httpd/conf/httpd.conf
|
sudo sed '/^Listen/s/^.*$/Listen 0.0.0.0:80/' -i /etc/httpd/conf/httpd.conf
|
||||||
elif is_suse; then
|
elif is_suse; then
|
||||||
APACHE_NAME=apache2
|
APACHE_NAME=apache2
|
||||||
@ -132,6 +139,7 @@ function init_horizon() {
|
|||||||
s,%HORIZON_DIR%,$HORIZON_DIR,g;
|
s,%HORIZON_DIR%,$HORIZON_DIR,g;
|
||||||
s,%APACHE_NAME%,$APACHE_NAME,g;
|
s,%APACHE_NAME%,$APACHE_NAME,g;
|
||||||
s,%DEST%,$DEST,g;
|
s,%DEST%,$DEST,g;
|
||||||
|
s,%HORIZON_REQUIRE%,$HORIZON_REQUIRE,g;
|
||||||
\" $FILES/apache-horizon.template >/etc/$APACHE_NAME/$APACHE_CONF"
|
\" $FILES/apache-horizon.template >/etc/$APACHE_NAME/$APACHE_CONF"
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -156,6 +164,9 @@ function install_horizon() {
|
|||||||
if [[ ! -e "/usr/bin/node" ]]; then
|
if [[ ! -e "/usr/bin/node" ]]; then
|
||||||
install_package nodejs-legacy
|
install_package nodejs-legacy
|
||||||
fi
|
fi
|
||||||
|
elif is_fedora && [[ "$os_RELEASE" -ge "18" ]]; then
|
||||||
|
# fedora 18 and higher gets nodejs
|
||||||
|
install_package nodejs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git_clone $HORIZON_REPO $HORIZON_DIR $HORIZON_BRANCH $HORIZON_TAG
|
git_clone $HORIZON_REPO $HORIZON_DIR $HORIZON_BRANCH $HORIZON_TAG
|
||||||
|
Loading…
Reference in New Issue
Block a user