You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-32Lines changed: 20 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -144,45 +144,28 @@ labels:
144
144
9. save the file
145
145
10. redeploy the `compose.yaml`
146
146
147
-
# coreruleset plugins
148
-
1. Download the plugin (all files inside the `plugins` folder of the git repo), most time: `<plugin-name>-before.conf`, `<plugin-name>-config.conf` and `<plugin-name>-after.conf` and sometimes `<plugin-name>.data` and/or `<plugin-name>.lua` or somilar files
149
-
2. put them into the `/opt/npmplus/modsecurity/crs-plugins` folder
150
-
3. maybe open the `/opt/npmplus/modsecurity/crs-plugins/<plugin-name>-config.conf` and configure the plugin
151
-
152
-
# Use as webserver
153
-
1. Create a new Proxy Host
154
-
2. Set `Scheme` to `https`, `Forward Hostname / IP` to `0.0.0.0`, `Forward Port` to `1` and enable `Websockets Support` (you can also use other values, since these get fully ignored)
155
-
3. Maybe set an Access List
156
-
4. Make your TLS Settings
157
-
5.
158
-
a) Custom Nginx Configuration (advanced tab), which looks the following for file server:
159
-
- Note: the slash at the end of the file path is important
160
-
```
161
-
location / {
162
-
alias /var/www/<your-html-site-folder-name>/;
163
-
#fancyindex off; # alternative to nginx "index" option (looks better and has more options)
164
-
}
165
-
```
166
-
b) Custom Nginx Configuration (advanced tab), which looks the following for file server and **php**:
167
-
- Note: the slash at the end of the file path is important
168
-
- Note: first enable `PHP82`, `PHP83` and/or `PHP84` inside your compose file
169
-
- Note: you can replace `fastcgi_pass php82;` with `fastcgi_pass php83;`/`fastcgi_pass php84;`
170
-
- Note: to add more php extension using envs you can set in the compose file
147
+
## use of external php-fpm (recommended)
148
+
1. Create a new Proxy Host with some dummy data for `Scheme` (like `path`), `Domain/IP/Path` (like `0.0.0.0`) (you can also use other values, since these get fully ignored)
149
+
2. make other settings (like TLS)
150
+
3. put this in the advanced tab and adjust:
171
151
```
172
152
location / {
173
-
alias /var/www/<your-html-site-folder-name>/;
153
+
alias /var/www/<your-html-site-folder-name>/; # or use the "root" directive of the line below
154
+
#root /var/www/<your-html-site-folder-name>; # or use the "alias" directive of the line above
174
155
#fancyindex off; # alternative to nginx "index" option (looks better and has more options)
175
-
location ~ [^/]\.php(/|$) {
176
-
fastcgi_pass php82;
177
-
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
178
-
if (!-f $document_root$fastcgi_script_name) {
179
-
return 404;
180
-
}
156
+
location ~* \.php(?:$|/) {
157
+
fastcgi_split_path_info ^(.*\.php)(/.*)$;
158
+
try_files $fastcgi_script_name =404;
159
+
fastcgi_pass ...; # set this to the address of your php-fpm
181
160
}
182
161
}
183
162
```
184
163
185
-
# Load Balancing
164
+
## use of inbuilt php-fpm (not recommended)
165
+
1. first enable php inside your compose file (you can add more php extension using envs in the compose file)
166
+
2. set the forwarding port to the php version you want to use and is supported by NPMplus (like 82/83/84)
167
+
168
+
## Load Balancing
186
169
1. open and edit this file: `/opt/npmplus/custom_nginx/http_top.conf` (or `/opt/npmplus/custom_nginx/stream_top.conf` for streams), if you changed /opt/npmplus to a different path make sure to change the path to fit
187
170
2. set the upstream directive(s) with your servers which should be load balanced (https://nginx.org/en/docs/http/ngx_http_upstream_module.html / https://nginx.org/en/docs/stream/ngx_stream_upstream_module.html), they need to run the same protocol (either http or https or tcp/udp for streams), like this for example:
14. I think this does not need to be mentioned, but you can mention it if you want to be sure (does not apply if you use letsencrypt, they don't support OCSP anymore): some clients (like firefox) send OCSP requests to your CA by default if the CA adds OCSP-URLs to your cert (can be disabled by the users in firefox), I think this does not need to be mentioned as no data goes to you, but directly to the CA and the client initiates this check by itself and is not ask or required by you to do this, your cert just says the the client can check this if it wants
325
308
15. Also optional and should no be required, I think: some information about the data saved by the nameservers running your domain, should not be required I think, since nearly always there is a provider between the users and your nameserver which acts like a proxy so the dns requests of your users will be hidden as theier provider, which instead should explain theier users how they handle data as "dns proxy"
326
309
310
+
## coreruleset plugins
311
+
1. Download the plugin (all files inside the `plugins` folder of the git repo), most time: `<plugin-name>-before.conf`, `<plugin-name>-config.conf` and `<plugin-name>-after.conf` and sometimes `<plugin-name>.data` and/or `<plugin-name>.lua` or somilar files
312
+
2. put them into the `/opt/npmplus/modsecurity/crs-plugins` folder
313
+
3. maybe open the `/opt/npmplus/modsecurity/crs-plugins/<plugin-name>-config.conf` and configure the plugin
314
+
327
315
## prerun scripts (EXPERT option) - if you don't know what this is, ignore it
328
316
if you need to run scripts before NPMplus launches put them under: `/opt/npmplus/prerun/*.sh` (please add `#!/usr/bin/env sh` / `#!/usr/bin/env bash` to the top of the script) you need to create this folder yourself, also enable the env
0 commit comments