我试图通过使用Naxsi来保护我的Nginx服务器,但是当我尝试重启Nginx时,我得到了这个错误:
Restarting nginx: nginx: [emerg] "LearningMode" directive is not allowed here in /etc/nginx/naxsi.rules:4
nginx: configuration file /etc/nginx/nginx.conf test failed
这是我的nginx.conf文件
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
我试图在Amazon上构建一个体系结构/基础设施。今天,我有一个像网关一样工作的EC2,后台是NGINX。顺便说一句我和NGINX是新来的。
上个星期,我有了这个NGINX配置文件:
server {
listen 80;
# I put * for hide the real domain name
server_name ******.com.ar www.******.com.ar;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy
对于启用/etc/nginx/site中的这个配置文件“默认”,我有几个问题。如下所示。
server
{
root /usr/share/nginx/www;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location / {
proxy_pass http://127.0.0.1:8080;
}
location /doc {
root /usr/share;
autoindex on;
al