Skip to content
Snippets Groups Projects
Commit b45b94cd authored by Bob Mottram's avatar Bob Mottram
Browse files

Create a self signed cert for the local domain

parent 22436fbf
No related branches found
No related tags found
No related merge requests found
......@@ -1149,7 +1149,7 @@ function install_web_local_user_interface {
{ echo '<html>';
echo ' <body>';
echo " This is a test on $local_hostname";
echo " This is a test on ${local_hostname}";
echo ' </body>';
echo '</html>'; } > "/var/www/${local_hostname}/htdocs/index.html"
......@@ -1160,8 +1160,33 @@ function install_web_local_user_interface {
echo " server_name ${local_hostname};";
echo " root /var/www/${local_hostname}/htdocs;";
echo ' index index.html;';
echo '}'; } > "$nginx_file"
nginx_ensite "$local_hostname"
echo '';
echo ' access_log /dev/null;';
echo ' error_log /dev/null;';
echo '}';
echo '';
echo 'server {';
echo ' listen 443 ssl;';
echo ' #listen [::]:443 ssl;';
echo " server_name ${local_hostname};";
echo " root /var/www/${local_hostname}/htdocs;";
echo ' index index.html;';
echo '';
echo ' access_log /dev/null;';
echo ' error_log /dev/null;';
echo ''; } >> "$nginx_file"
nginx_ssl "${local_hostname}"
nginx_security_options "${local_hostname}"
{ echo ' add_header Strict-Transport-Security max-age=0;';
echo '}'; } >> "$nginx_file"
if [ ! -f "/etc/ssl/certs/${local_hostname}.crt" ]; then
"${PROJECT_NAME}-addcert" -h "${local_hostname}" --dhkey "${DH_KEYLENGTH}"
fi
nginx_ensite "${local_hostname}"
# Compatibility with FreedomBox android app
# The installed apps get published to a json file called "1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment