simon987 / ngx_http_js_challenge_module

Simple javascript proof-of-work based access for Nginx with virtually no overhead. (Similar to Cloudflare's anti-DDoS feature)
GNU General Public License v3.0
61 stars 25 forks source link

Directadmin #3

Open ionel666 opened 4 years ago

ionel666 commented 4 years ago

Hello,

I added this module to directadmin (Reverse-proxy NGINX + Apache)

#!/bin/sh
./configure \
    "--user=nginx" \
    "--group=nginx" \
    "--prefix=/usr" \
    "--sbin-path=/usr/sbin" \
    "--conf-path=/etc/nginx/nginx.conf" \
    "--pid-path=/var/run/nginx.pid" \
    "--http-log-path=/var/log/nginx/access_log" \
    "--error-log-path=/var/log/nginx/error_log" \
    "--without-mail_imap_module" \
    "--without-mail_smtp_module" \
    "--with-http_ssl_module" \
    "--with-http_realip_module" \
    "--with-http_stub_status_module" \
    "--with-http_gzip_static_module" \
    "--with-http_dav_module" \
    "--with-http_v2_module" \
    "--with-cc-opt='-D FD_SETSIZE=32768'" \
        "--with-cc-opt='-O2'" \
    "--with-ld-opt='-Wl,-rpath,/usr/local/lib'" \
    "--add-module=/usr/local/directadmin/custombuild/custom/nginx_reverse/ngx_devel_kit-0.3.1" \
    "--add-module=/usr/local/directadmin/custombuild/custom/nginx_reverse/lua-nginx-module-0.10.15" \
    "--add-dynamic-module=/root/tesss/ngx_http_js_challenge_module" 

In webapps_settings.conf from the / etc / nginx folder I added

try_files $uri =404;
root /var/www/html/;
fastcgi_pass unix:/usr/local/php54/sockets/webapps.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
include /etc/nginx/nginx_limits.conf;
load_module ngx_http_js_challenge_module.so;

But when I go to the website this way doesn't work. I couldn't find where to activate it.

simon987 commented 4 years ago

Hi, very sorry for the delay @ionel666.

Where in your nginx configuration file did you put the js_challenge on; directive?