Customize Landing Page#
The reference deployment has the following NGINX proxy configuration
(in 05_deployments/proxy-deployment.yaml
) for the ESS landing page (signup.${DOMAIN}
):
# Custom signup pages
server {
listen 11000;
server_name signup.${DOMAIN};
root /usr/share/nginx/html;
ssl on;
ssl_certificate /opt/inrupt/server.crt;
ssl_certificate_key /opt/inrupt/server.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
You can customize the signup.${DOMAIN}
landing page by creating a
Kubernetes ConfigMap named custom-www-config
from your custom
file(s). To create the custom-www-config
ConfigMap from your files,
use kubectl create cm --from-file=<file>
command.
For example, consider the following index.html
file:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My Enterprise Solid Server</title>
</head>
<body>
<header>
<h2>Welcome to Solid!</h2>
</header>
...
<script>
...
</script>
</body>
</html>
To use this index.html
for your landing page, create the
custom-www-config
ConfigMap from the file:
kubectl -n ess create cm custom-www-config --from-file=index.html
To include multiple files, include the --from-file
option multiple
times. For example, consider the following index.html
file,
which requires a JavaScript file registration.js
, a CSS file
styles.css
, and an image file logo.png
:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My Enterprise Solid Server</title>
<link rel="stylesheet" href="styles.css" />
<script src="registration.js"></script>
</head>
<body>
<header>
<h2>Welcome to Solid!
<span class=logo>
<img src="logo.png" loading="lazy" width="120" alt="Company Logo" class="image">
</span>
</h2>
</header>
...
</body>
</html>
To create a custom-www-config
ConfigMap with all the required
files, specify the --from-file
option multiple times to include all
the necessary files:
kubectl -n ess create cm custom-www-config --from-file=index.html --from-file=styles.css \
--from-file=logo.png --from-file=registration.js