From b4e7d6ba5e12421f7d1062a5dc4e4d24efdb5a71 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Sun, 8 Sep 2013 09:55:58 +0000 Subject: [PATCH] create a basic hello world page on http/https --- conf/www_default.html | 9 +++++++++ scripts/web.sh | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 conf/www_default.html diff --git a/conf/www_default.html b/conf/www_default.html new file mode 100644 index 0000000..4c8fa47 --- /dev/null +++ b/conf/www_default.html @@ -0,0 +1,9 @@ + + + this is a mailinabox + + +

this is a mailinabox

+

https://github.com/tauberer/mailinabox

+ + diff --git a/scripts/web.sh b/scripts/web.sh index 2f23e7b..149bf02 100755 --- a/scripts/web.sh +++ b/scripts/web.sh @@ -9,12 +9,17 @@ rm -f /etc/nginx/sites-enabled/default STORAGE_ROOT_ESC=$(echo $STORAGE_ROOT|sed 's/[\\\/&]/\\&/g') PUBLIC_HOSTNAME_ESC=$(echo $PUBLIC_HOSTNAME|sed 's/[\\\/&]/\\&/g') +# copy in the nginx configuration file and substitute some +# variables cat conf/nginx.conf \ | sed "s/\$STORAGE_ROOT/$STORAGE_ROOT_ESC/g" \ | sed "s/\$PUBLIC_HOSTNAME/$PUBLIC_HOSTNAME_ESC/g" \ > /etc/nginx/conf.d/local.conf +# make a default homepage mkdir -p $STORAGE_ROOT/www/static +cp conf/www_default.html $STORAGE_ROOT/www/static/index.html +chown -R $STORAGE_USER $STORAGE_ROOT/www/static/index.html service nginx restart