0 # PoW Shield

1

2 A nginx module to add a proof-of-work challenge before accessing a page.

3

4 ![pic0](./img/img.webp)

5

6 ## Build

7

8 To build this module you will need to download nginx source code first.

9 Clone Pow Shield repository outside of the nginx source folder.

10 In the nginx source code directory uses the command :

11

12 ./auto/configure --add-dynamic-module=[absolute path to PoW-Shield repo]

13

14 This will build PoW Shield as a dynamically loadable module.

15 If you want to build the module for a pre-compiled nginx server, you will need

16 to get the source code of the same version as the pre-built nginx.

17 You will also need to compile it with the same flags. To see with which flags

18 a nginx binary was built with, use the command 'nginx -V'.

19

20 ## Configuration

21

22 In your nginx configuration file, add 'powshield "on";' to a server or a location.

23 The protection can also be disabled for specific URLs with 'powshield "off";'

24

25 ![pic1](./img/conf.png)

26

27 If the module was built as a dynamic module, you will need to add at the top of

28 your nginx configuration file the following line :

29

30 load_module "/path/to/ngx_http_powshield_module.so";

31