While activating naxsi for my set up that uses nginx as reverse proxy with gunicorn, I've run into a misbehaving piece of code. Can someone help?
For now, I'm trying to turn naxsi on in LearningMode
. I've added the following in the http
section of my nginx.conf
:
include /etc/nginx/naxsi_core.rules;
Also, I've changed DeniedURL
value in naxsi.rules. So far so good.
My problem arises where I'm supposed to edit /etc/nginx/sites-enabled/default" (as instructed in various online tutorials) to include include /etc/nginx/naxsi.rules;
in root location.
My file in sites-enabled
isn't called default
, it's myproject
. In sites-available
though, I have default
and myproject
both (remember this, this has a role later in the question).
No worries so far. I add /etc/nginx/naxsi.rules;
in myproject
.
I next restart nginx via sudo service nginx restart
. It fails to restart. I reverted. Then added the default
file at /etc/nginx/sites-enabled/
(copied from sites-available/default
), and added /etc/nginx/naxsi.rules;
there.
Restarted again. Still failed. I reverted everything and restarted. The server is up and running, but I don't have naxsi.
What am I doing wrong? It's probably something basic.
Aucun commentaire:
Enregistrer un commentaire