将ModSecurity与nginx集成

huangapple go评论61阅读模式
英文:

Integrating ModSecurity with nginx

问题

我已经从源代码编译了NGINX,现在我想集成ModSecurity。我已经按照这个网站https://opsshield.com/help/cpguard/install-modsecurity-with-nginx-on-debian-ubuntu/上提到的步骤进行了操作,但当我尝试运行像'make modules'这样的命令时,我遇到了这个错误:make: *** No rule to make target 'modules'. Stop.我已经按照相同的步骤进行了操作,我正在使用nginx 1.18.0版本,我被困在这里,请有人帮助我,谢谢。

ubuntu@vps-622:/usr/local/src/cpg/nginx-1.18.0$ ls CHANGES CHANGES.ru LICENSE Makefile README auto conf configure contrib html man objs src ubuntu@vps-622:/usr/local/src/cpg/nginx-1.18.0$ make modules make: *** No rule to make target 'modules'. Stop.

从源代码下载并编译NGINX。克隆了ModSecurity Nginx Connector存储库并使用configure和make命令构建了模块。

编辑:现在当我运行'sudo nginx -t'时,我得到这个错误:

nginx: [emerg] host not found in upstream "website.com" in /etc/nginx/sites-enabled/site.conf:39
nginx: configuration file /etc/nginx/nginx.conf test failed

我搞砸了,求帮助。

英文:

I have compiled NGINX from source code and now I want to integrate ModSecurity. I have followed the steps mentioned in this website https://opsshield.com/help/cpguard/install-modsecurity-with-nginx-on-debian-ubuntu/
but i encountered i problem when i try to run the command like 'make modules', i get this error:
make: *** No rule to make target 'modules'. Stop.
i have followed the same steps, i'm using nginx 1.18.0, i'm stuck here, please someone helpe me, thanks.

ubuntu@vps-622:/usr/local/src/cpg/nginx-1.18.0$ ls
CHANGES CHANGES.ru LICENSE Makefile README auto conf configure contrib html man objs src
ubuntu@vps-622:/usr/local/src/cpg/nginx-1.18.0$ make modules
make: *** No rule to make target 'modules'. Stop.

Downloaded and compiled NGINX from source code.
cloned the ModSecurity Nginx Connector repository and built the module using the configure and make commands.

EDIT: now when i do 'sudo nginx -t' i get this error:

enter code hernginx: [emerg] host not found in upstream "website.com" in /etc/nginx/sites-enabled/site.conf:39

nginx: configuration file /etc/nginx/nginx.conf test failede

I messed up, any help please

答案1

得分: 2

如果您使用Debian或Ubuntu,应该尝试来自Digitalwave存储库的预编译软件包:https://modsecurity.digitalwave.hu。

英文:

If you use Debian or Ubuntu, you should try the pre-compiled packages from Digitalwave's repository: https://modsecurity.digitalwave.hu.

huangapple
  • 本文由 发表于 2023年7月12日 21:18:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/76671030.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定