Closed w796933 closed 3 years ago
I solved this problem. nginx must be run as root user
Now there is another error.
oroutine 0: /usr/local/openresty/nginx/conf/SiteShield.lua: in function 'AUTH' /usr/local/openresty/nginx/conf/SiteShield.lua:430: in main chunk, client: 101.32 , server: , request: "GET /SiteShield/Authenticate?q=ezhjmroulerfpdvpavbvqv&a=2624 HTTP/1.1", host: et", referrer: "http://a 2021/03/25 07:07:27 [error] 12830#12830: *4 lua entry thread aborted: runtime error: /usr/local/openresty/nginx/conf/SiteShield.lua:342: attempt to perform arithmetic on local 'authenticationTime' (a nil value) stack traceback: coroutine 0: /usr/local/openresty/nginx/conf/SiteShield.lua: in function 'AUTH' /usr/local/openresty/nginx/conf/SiteShield.lua:430: in main chunk, cl h.net, request: "GET /SiteShield/Authenticate?q=yiprbc&a=2069. HTTP/1.1", host: "antid et", referrer: "http://an t/"
@w796933
It looks as though you're not setting the necessary variables within your config, please refer to the below documentation:
https://github.com/dbContext/SiteShield-OpenResty/blob/main/README.md#installing-siteshield
The above message relates to having no $auth_time
variable set, however you'll want to replicate the entire set of variables.
set $auth_time '86400'; # Time User is Authenticated after Challenge in seconds.
set $allow_ip ''; # format: 1.1.1.1;2.2.2.2;3.3.3.3
set $block_ip ''; # format: 4.4.4.4;5.5.5.5;6.6.6.6
set $allow_uri ''; # format: /allow-this-uri;/also/allow/this/uri
set $block_uri ''; # format: /block-this-uri;/also/block/this/uri
set $max_failed_challenge_attempts '5'; # Max Failed Challenge Attempts before IP block.
set $max_time_window_challenges '120'; # Max Challenges Served in Time Window (e.g. 5 Challenges with in 120 seconds.)
my config
server {
server_name fff.net
set $auth_time '86400'; # Time User is Authenticated after Challenge in seconds.
set $allow_ip ''; # format: 1.1.1.1;2.2.2.2;3.3.3.3
set $block_ip ''; # format: 4.4.4.4;5.5.5.5;6.6.6.6
set $allow_uri ''; # format: /allow-this-uri;/also/allow/this/uri
set $block_uri ''; # format: /block-this-uri;/also/block/this/uri
set $max_failed_challenge_attempts '5'; # Max Failed Challenge Attempts before IP block.
set $max_time_window_challenges '120'; # Max Challenges Served in Time Window (e.g. 5 Challenges with in 120 seconds.)
location / {
content_by_lua_file /usr/local/openresty/nginx/conf/SiteShield.lua;
}
error_page 555 = @backend;
location @backend {
proxy_set_header Host $host;
proxy_set_header SiteShield-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_redirect off;
proxy_buffering off;
proxy_pass http://1.1.1.1:3000;
}
}
*5 lua entry thread aborted: runtime error: /usr/local/openresty/nginx/conf/SiteShield.lua:342: attempt to perform arithmetic on local 'authenticationTime' (a nil value)
i is setup set $auth_time '86400'; sir can i help me check ?
I have solved the problem. I'm very much obliged to you .
@w796933
Great to hear, could you let me know what you did to resolve this? Just curious whether it's something I can expand upon within our documentation.
Thanks.
r: "http:///" 2021/03/25 06:09:09 [crit] 19352#19352: 19 connect() to unix:/tmp/shell.sock failed (2: No such file or directory), client: 101.32. 9.1 , server: a request: "GET", refer 2021/03/25 06:09:12 [crit] 19352#19352: 24 connect() to unix:/tmp/shell.sock failed (2: No such file or directory), client: 101.32.209.120, server: , request: "GET /SiteShield/Authenticate?q=eeb&a=65. HTTP/1.1", host: t", referrer: "" 2021/03/25 06:09:24 [error] 19352#19352: *27 lua entry thread aborted: runtime error: /usr/local/openresty/nginx/conf/SiteShield.lua:342: attempt to perform arithmetic on local 'authenticationTime' (a nil value) stack traceback: coroutine 0: /usr/local/openresty/nginx/conf/SiteShield.lua: in function 'AUTH' /usr/local/openresty/nginx/conf/SiteShield.lua:430: in main chunk, client: 101.32. .1 , server: request: "GET /SiteShield/Authenticate?q=vkkzgjjdmsnfsuvnwlxti&a=11542. HTTP/1.1", host: ", referre r: "
ps -aef | grep sock root 4299 1 0 06:53 ? 00:00:00 ./sockproc /tmp/shell.sock root 5858 3296 0 06:55 pts/0 00:00:00 grep --color=auto sock
sockproc is running .