Remove obsolete u-OS nginx configuration

This commit is contained in:
Albrecht Lohofener
2025-03-28 14:27:51 +01:00
parent f540af18f4
commit 7e57113be2
4 changed files with 5 additions and 65 deletions
+3 -11
View File
@@ -31,15 +31,6 @@ if [ ! -d "$STORAGE" ]; then
error "Storage folder ($STORAGE) not found!" && exit 13
fi
# Check u-OS app
if [[ -z "${IS_U_OS_APP}" ]]; then
info "Detected generic container"
cp -f /var/www/nginx.conf.generic /etc/nginx/http.d/web.conf
else
info "Detected u-OS app"
cp -f /var/www/nginx.conf.u-os-app /etc/nginx/http.d/web.conf
fi
# Generate page for meta information
echo "* Content of /var/vm/openwrt_metadata.conf *" > /var/www/system_info.txt
cat /var/vm/openwrt_metadata.conf >> /var/www/system_info.txt
@@ -61,6 +52,7 @@ lspci >> /var/www/system_info.txt
set -e # Revert set +a
# ******* nginx handling *******
cp -f /var/www/nginx.conf /etc/nginx/http.d/web.conf
cp -r /var/www/* /run/shm
# ******* LuCi forwarding handling *******
@@ -77,12 +69,12 @@ else
if [[ $FORWARD_LUCI = "true" ]]; then
warn "LuCI forwarding is only available if environment variable is set to LAN_IF: 'veth'. Currently LAN_IF=$LAN_IF."
fi
LUCI_COMMAND="sh -c 'sleep infinity'" # TODO: Find something better. Multirun needs something to run.
LUCI_COMMAND="sh -c 'sleep infinity'" # TODO: Find something better. Multirun needs something to run.
fi
# ******* OpenWrt run command after boot handling *******
if [[ -z "${OPENWRT_AFTER_BOOT_CMD}" ]]; then
OPENWRT_MULTIRUN_CMD="sh -c 'sleep infinity'" # TODO: Find something better. Multirun needs something to run.
OPENWRT_MULTIRUN_CMD="sh -c 'sleep infinity'" # TODO: Find something better. Multirun needs something to run.
else
info "Invoke command '${OPENWRT_AFTER_BOOT_CMD}' into OpenWrt after it is booted"
OPENWRT_MULTIRUN_CMD="/run/run_command_after_openwrt_boot.sh '${OPENWRT_AFTER_BOOT_CMD}'"
+2
View File
@@ -103,6 +103,8 @@ attach_veth_if () {
# Only as u-OS app
if [[ -n "${IS_U_OS_APP}" ]]; then
info "Detected u-OS app"
# Check if u-OS webserver is already configured
if ! nsenter --target 1 --uts --net --ipc --mount grep -q "app-openwrt0" "/usr/lib/uc-http-server/ucu.yml" ; then
info "Adding app-openwrt0 to /usr/lib/uc-http-server/ucu.yml ..."
-54
View File
@@ -1,54 +0,0 @@
server {
listen 80;
listen [::]:80;
listen 8006 default_server;
listen [::]:8006 default_server;
autoindex on;
tcp_nodelay on;
server_tokens off;
absolute_redirect off;
error_log /dev/null;
access_log /dev/null;
include /etc/nginx/mime.types;
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 5;
gzip_min_length 500;
gzip_disable "msie6";
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml;
add_header Cache-Control "no-cache";
location / {
root /var/www/browser;
try_files $uri $uri/ /index.html;
}
location /websockify {
proxy_http_version 1.1;
proxy_set_header Connection 'upgrade';
proxy_set_header Upgrade $http_upgrade;
proxy_buffering off;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_pass http://127.0.0.1:5700/;
}
location /api/ {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:8080/;
}
}