Using the specific Apache2 tools a2ensite and a2dissite
(used in the methods disable/enable_apache_site in lib/apache)
should be the preferred way to disable the default site and
to enable the horizon site.
fixes bug #1298031
Change-Id: I2f247c0b6e605a330086a558e03e2c36666c55be
| ... | ... |
@@ -114,11 +114,9 @@ function init_horizon {
|
| 114 | 114 |
|
| 115 | 115 |
local horizon_conf=/etc/$APACHE_NAME/$APACHE_CONF_DIR/horizon.conf |
| 116 | 116 |
if is_ubuntu; then |
| 117 |
- # Clean up the old config name |
|
| 118 |
- sudo rm -f /etc/apache2/sites-enabled/000-default |
|
| 119 |
- # Be a good citizen and use the distro tools here |
|
| 117 |
+ disable_apache_site 000-default |
|
| 120 | 118 |
sudo touch $horizon_conf |
| 121 |
- sudo a2ensite horizon.conf |
|
| 119 |
+ enable_apache_site horizon.conf |
|
| 122 | 120 |
elif is_fedora; then |
| 123 | 121 |
sudo sed '/^Listen/s/^.*$/Listen 0.0.0.0:80/' -i /etc/httpd/conf/httpd.conf |
| 124 | 122 |
elif is_suse; then |