Skip to content

Commit

Permalink
Replaced hardcoded symlinks with a2ensite in apache config
Browse files Browse the repository at this point in the history
  • Loading branch information
fpapadopou committed Nov 5, 2015
1 parent cb701b3 commit 2c6dfd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/install_apache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ PACKAGENAME=eratosthenes
sudo cp /opt/codebender/$PACKAGENAME/apache-config-2.4 /etc/apache2/sites-available/codebender-$PACKAGENAME

This comment has been minimized.

Copy link
@spiliot

spiliot Nov 5, 2015

Contributor

In recent versions of ubuntu with apache 2.4, sites-available configuration files must end in .conf extensions because of this apache configuration:

IncludeOptional sites-enabled/*.conf 

I believe /codebender-$PACKAGENAME will leave them without the extension, so a2ensite will fail later.

This comment has been minimized.

Copy link
@fpapadopou

fpapadopou Nov 5, 2015

Author Contributor

Done in the install_apache.sh script which is intended to be run on Ubuntu 14.04 with Apache 2.4. Travis CI still uses Ubuntu 12.04 with Apache 2.2 so there is no need to change it there.

cd /etc/apache2/sites-enabled
# Add the vhost configuration file to the enabled sites
sudo ln -s ../sites-available/codebender-$PACKAGENAME 00-codebender.conf
sudo a2ensite codebender-$PACKAGENAME
# Reload apache in order to enable the new configurations
sudo service apache2 reload
2 changes: 1 addition & 1 deletion scripts/travis_install_apache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PACKAGENAME=eratosthenes
sudo cp /opt/codebender/$PACKAGENAME/apache-config-2.2 /etc/apache2/sites-available/codebender-$PACKAGENAME
cd /etc/apache2/sites-enabled
# Add the vhost configuration file to the enabled sites
sudo ln -s ../sites-available/codebender-$PACKAGENAME 00-codebender
sudo a2ensite codebender-$PACKAGENAME
# Reload apache in order to enable the new configurations
sudo service apache2 reload

0 comments on commit 2c6dfd7

Please sign in to comment.