mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-22 02:17:26 +00:00
create a basic hello world page on http/https
This commit is contained in:
parent
b770c5370b
commit
b4e7d6ba5e
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')
|
STORAGE_ROOT_ESC=$(echo $STORAGE_ROOT|sed 's/[\\\/&]/\\&/g')
|
||||||
PUBLIC_HOSTNAME_ESC=$(echo $PUBLIC_HOSTNAME|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 \
|
cat conf/nginx.conf \
|
||||||
| sed "s/\$STORAGE_ROOT/$STORAGE_ROOT_ESC/g" \
|
| sed "s/\$STORAGE_ROOT/$STORAGE_ROOT_ESC/g" \
|
||||||
| sed "s/\$PUBLIC_HOSTNAME/$PUBLIC_HOSTNAME_ESC/g" \
|
| sed "s/\$PUBLIC_HOSTNAME/$PUBLIC_HOSTNAME_ESC/g" \
|
||||||
> /etc/nginx/conf.d/local.conf
|
> /etc/nginx/conf.d/local.conf
|
||||||
|
|
||||||
|
# make a default homepage
|
||||||
mkdir -p $STORAGE_ROOT/www/static
|
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
|
service nginx restart
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user