Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prepare-precise64.sh #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions carcass/vagrant/prepare-precise64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ rm -rf /etc/apache2/sites-enabled/*
# Enabling mod_rewrite on server
## `cd` is just for symlink to have same format as others inside `mods-enabled/`
cd /etc/apache2/mods-enabled/
ln -s ../mods-available/rewrite.load rewrite.load
ln -sn ../mods-available/rewrite.load rewrite.load

# Make the apache load under our user account.
sed -ri 's/^(export APACHE_RUN_USER=)(.*)$/\1vagrant/' /etc/apache2/envvars
Expand All @@ -47,9 +47,18 @@ sed -ri 's/^(export APACHE_RUN_GROUP=)(.*)$/\1vagrant/' /etc/apache2/envvars
touch /etc/apache2/conf-available/globalname.conf
echo "ServerName boilerplate" > /etc/apache2/conf-available/globalname.conf
cd /etc/apache2/conf-enabled
ln -s ../conf-available/globalname.conf globalname.conf
ln -sn ../conf-available/globalname.conf globalname.conf

# Creating database
mysql -u root -p${DB_PASS} -e "create database if not exists ${DB_NAME}";


#setup ssl
openssl req -new -x509 -days 30 -keyout server.key -out server.pem
cp server.key{,.orig}
openssl rsa -in server.key.orig -out server.key
rm server.key.orig
cp server.pem /etc/ssl/certs/
cp server.key /etc/ssl/private/
chmod 0600 /etc/ssl/private/server.key
a2enmod ssl
a2ensite default-ssl