Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stream日志配置不了吗 #818

Closed
wtjperi2003 opened this issue Jan 13, 2025 · 7 comments
Closed

stream日志配置不了吗 #818

wtjperi2003 opened this issue Jan 13, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@wtjperi2003
Copy link

Describe the bug
stream里配置一个能记录tcp连接的日志

配置如下
Steps to reproduce the behavior:
log_format basic '$remote_addr [$time_local] '
'$protocol $status $bytes_sent $bytes_received '
'$session_time';

access_log /spool/logs/nginx-access.log basic buffer=32k;

是不是nginx里少了ngx_stream_log_module模块
官网的配置文档

@wtjperi2003 wtjperi2003 added the bug Something isn't working label Jan 13, 2025
@0xJacky
Copy link
Owner

0xJacky commented Jan 13, 2025

Nginx UI 的部署方式?

@wtjperi2003
Copy link
Author

Nginx UI 的部署方式?

docker

docker run -d \
  --name=nginx-ui \
  --restart=always \
  -e TZ=Asia/Shanghai \
  -e NGINX_UI_NGINX_LOG_DIR_WHITE_LIST=/var/log/nginx \
  -v /nginx-ui/nginx:/etc/nginx \
  -v /nginx-ui/ui:/etc/nginx-ui \
  --net host \
  uozi/nginx-ui:latest

@0xJacky
Copy link
Owner

0xJacky commented Jan 20, 2025

我们提供的镜像里没有这个模块,如果需要用,需要自行安装

@wtjperi2003
Copy link
Author

新版本里考虑内置吗?

@0xJacky
Copy link
Owner

0xJacky commented Jan 20, 2025

我其实是比较建议专业用户使用二进制安装,管理宿主机上的 Nginx UI

@0xJacky
Copy link
Owner

0xJacky commented Jan 21, 2025

Nginx UI 目前的镜像是 Nginx UI 主程序和官方版 Nginx (几乎无扩展模块)打包在一起的,对于大多数为了开箱即用的,非企业级用户来说功能是够用的。由于 Nginx 的扩展模块很多,而且对 Nginx 版本依赖不尽相同,对于项目维护者来说,将精力放在这方面上是不实际的,也不可能。

对于高级玩家或企业级用户,建议使用基于宿主机的部署方式,使用 Nginx UI 直接管理宿主机上的 Nginx,这样您可以方便的安装你需要的用到的扩展模块,当然你也可以构建自己的 Docker 镜像。

如果你希望使用 Docker 部署,未来我们也会提供仅包含 Nginx UI 的镜像。

The current Nginx UI image includes the main program and an official version of Nginx with minimal extensions. For most users who want a ready-to-use solution that isn't enterprise-level, this setup provides sufficient functionality. Given the numerous extension modules available for Nginx and their varying dependencies on different versions, it is impractical for project maintainers to focus on managing these modules.

For advanced users or enterprise-level customers, we recommend deploying Nginx UI directly on the host machine to manage Nginx there. This approach allows you to easily install the extension modules you need, and you can also build your own Docker images.

If you prefer using Docker for deployment, in the future, we will provide an image that includes only Nginx UI.

@wtjperi2003
Copy link
Author

好吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants