create a basic hello world page on http/https
This commit is contained in:
parent
b770c5370b
commit
b4e7d6ba5e
2 changed files with 14 additions and 0 deletions
9
conf/www_default.html
Normal file
9
conf/www_default.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>this is a mailinabox</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>this is a mailinabox</h1>
|
||||
<p><a href="https://github.com/tauberer/mailinabox">https://github.com/tauberer/mailinabox</a></p>
|
||||
</body>
|
||||
</html>
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue