diff --git a/README.md b/README.md index 291c49b..effdaa2 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ systemctl status angie.service --no-pager systemctl status npm.service --no-pager # NPM UI -# Default: http(s):// (see summary printed by installer) +# Default: http(s)://:81 (see summary printed by installer) ``` --- @@ -90,25 +90,18 @@ systemctl status npm.service --no-pager **3) Config test fails on PID** - The **nginx wrapper** ensures `nginx -t` writes test PID to `/tmp`, not to `/run/angie/angie.pid`. -**4) `/etc/nginx` not pointing to Angie** -- The installer ensures `/etc/nginx -> /etc/angie`. To fix manually: - ```bash - sudo mv /etc/nginx /etc/nginx.bak # if it is a dir/file - sudo ln -sfn /etc/angie /etc/nginx - ``` - --- ## Uninstall (manual) ```bash sudo systemctl disable --now npm.service angie.service || true sudo rm -f /usr/sbin/nginx /usr/local/bin/logrotate-npm || true -# restore backups if you created any; remove /opt/npm, configs, etc. with care ``` --- ## License -MIT (unless your repo specifies otherwise). +MIT -## Author linuxiarz.pl, Mateusz Gruszczyński \ No newline at end of file +## Author +linuxiarz.pl, Mateusz Gruszczyński \ No newline at end of file diff --git a/npm_install.py b/npm_install.py index 1ee7308..980b0c2 100644 --- a/npm_install.py +++ b/npm_install.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# install_npm_angie.py + import argparse, os, sys, json, shutil, subprocess, tarfile, tempfile, urllib.request, re, time, threading, signal from pathlib import Path @@ -197,6 +197,17 @@ def ensure_nginx_symlink(): ANGIE_CONF_TEMPLATE = """# run nginx in foreground #daemon off; + +load_module /etc/angie/modules/ngx_http_headers_more_filter_module.so; +load_module /etc/angie/modules/ngx_http_brotli_filter_module.so; +load_module /etc/angie/modules/ngx_http_brotli_static_module.so; +load_module /etc/angie/modules/ngx_http_zstd_filter_module.so; +load_module /etc/angie/modules/ngx_http_zstd_static_module.so; + +# other modules +include /data/nginx/custom/modules[.]conf; + + pid /run/angie/angie.pid; user root; @@ -205,8 +216,6 @@ pcre_jit on; error_log /data/logs/fallback_error.log warn; -include /etc/angie/modules/*.conf; - # Custom include /data/nginx/custom/root_top[.]conf; @@ -261,6 +270,7 @@ http { zstd_min_length 256; zstd_comp_level 3; more_clear_headers "Server"; + more_set_headers 'X-by: linuxiarz.pl'; # npm include /data/nginx/custom/http_top[.]conf; @@ -711,7 +721,7 @@ def print_summary(info, ipv6_enabled, dark_enabled, update_mode): print(f"Node.js: v{node_v}") print(f"Yarn: v{yarn_v}") print(f"NPM (aplikacja): v{npm_v}") - print(f"IPv6: {'WŁĄCZONE (nie usuwano wpisów)' if ipv6_enabled else 'WYŁĄCZONE w konfigach'}") + print(f"IPv6: {'ENABLED' if ipv6_enabled else 'DISABLED (in confogs too)'}") print(f"Dark mode (TP): {'TAK' if dark_enabled else 'NIE'}") print("Paths: /opt/npm (app), /data (data), /etc/angie (conf), /var/log/angie (logs)") print("Services: systemctl status angie.service / npm.service")