Add Nginx Cockpit Awareness

This commit is contained in:
t3chn0m4g3
2023-04-27 18:42:38 +02:00
parent a08a475f57
commit 5fd0d158e6
6 changed files with 152 additions and 5 deletions

View File

@ -90,16 +90,23 @@ server {
auth_basic "closed site";
auth_basic_user_file /etc/nginx/nginxpasswd;
#############################
### T-Pot Landing Page & Apps
#############################
location / {
index index.html;
set_by_lua_block $index_file {
local cockpit = os.getenv("COCKPIT")
if cockpit == "false" then
return "index_light.html"
else
return "index.html"
end
}
auth_basic "closed site";
auth_basic_user_file /etc/nginx/nginxpasswd;
try_files $uri $uri/ /index.html;
index $index_file;
try_files $uri $uri/ /$index_file;
}
location /elasticvue {