diff --git a/conf/www_default.html b/conf/www_default.html new file mode 100644 index 00000000..4c8fa477 --- /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 2f23e7be..149bf027 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