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
+122-1Lines changed: 122 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ I won't go in to too much detail here but here are the basics for someone new to
68
68
version: '3'
69
69
services:
70
70
app:
71
-
image: 'jc21/nginx-proxy-manager:latest'
71
+
image: 'baudneo/nginx-proxy-manager:latest'
72
72
restart: unless-stopped
73
73
ports:
74
74
- '80:80'
@@ -100,6 +100,127 @@ Password: changeme
100
100
101
101
Immediately after logging in with this default user you will be asked to modify your details and change your password.
102
102
103
+
# Timezone
104
+
## Environment Variables
105
+
-`TZ` - Set to your timezone. Example: `TZ=America/Chicago`
106
+
107
+
## Configuration
108
+
- Instead of setting `TZ` you can mount `/etc/localtime` into the docker container
109
+
-------
110
+
# CrowdSec OpenResty Bouncer
111
+
112
+
## NOTE
113
+
- If you don't see the bouncer hitting your local API, send a request to one of the proxied hosts in NPM. I have noticed the bouncer does not start until NPM gets a request once it is all loaded up.
114
+
- To check if the bouncer is running, use `docker logs --follow [name of your NPM container]`. There will be a log line like -> `nginx: [alert] [lua] init_by_lua:8: [Crowdsec] Initialisation done`
115
+
116
+
## Environment Variables
117
+
-`CROWDSEC_BOUNCER=1` - Enable CrowdSec OpenResty bouncer, still needs to be configured.
118
+
-`CROWDSEC_LAPI=[URL]` - configure CrowdSec local API URL
119
+
-`CROWDSEC_KEY=[API KEY]` - configure CrowdSec API key
-`SSL_CERTS_PATH` - CA certificate used to communicate with Google for reCAPTCHA validation
123
+
## Configuration
124
+
- Config file located at `data/crowdsec/crowdsec-openresty-bouncer.conf`
125
+
- HTML templates are located at `/crowdsec/templates/` inside the container
126
+
- The first time the container is run, a crowdsec config file is created with ENV vars substituted out. User is responsible for config after first creation of the file.
127
+
- Set the URL and API key at a minimum. reCAPTCHA's vars if wanted.
-`OPENRESTY_DEBUG=1` - Enable DEBUG level logging for the default OpenResty `ERROR` log
134
+
135
+
## Configuration
136
+
- Admin panel logs are located at `data/logs/admin-panel_access.log` and `data/logs/admin-panel_error.log`
137
+
- OpenResty default logs `fallback_access.log` and `fallback_error.log`. `DEBUG` level will be set on the error log, it is set to `WARN` by default.
138
+
-------
139
+
# ModSecurity
140
+
_ModSecurity WAF is installed and loaded by default, OWASP-CoreRuleSet is installed and used as the default rule set. The user is responsible for configuring modsecurity via config/CLI._
141
+
142
+
## Environment Variables
143
+
-`MODSEC_CREATE=1` - Force recreating the default modsecurity config, _This should never be needed_
144
+
-`MODSEC_ADMIN_PANEL=1` - Enable ModSec for the admin panel
145
+
-`MODSEC_ENABLE=1` - Enable ModSec for the default.conf server block
146
+
147
+
## Tips to enable
148
+
### The minimum directives that need to be added to enable modsec.
149
+
- See all directives -> https://github.com/SpiderLabs/ModSecurity-nginx#usage
- To enable modsec for **ALL HTTP** hosts, add the directives to `data/nginx/custom/http_top.conf`
155
+
- To enable for only **certain HTTP** hosts, add the directives to the `Advanced` tab configuration at the root level (not inside a `___location` block)
156
+
- To enable only for **certain locations** on _certain HTTP_ hosts, place the directives into a `___location` block inside the `Advanced` tab
157
+
-**Stream hosts are untested and, as far as I know, unsupported**. ModSec directives go in server and HTTP blocks.
158
+
159
+
## Configuration
160
+
- By default, the audit log is enabled and is located at `data/logs/modsec_audit.log`
161
+
- The config and rule set are located at `data/modsec` and `data/modsec/ruleset`
162
+
-`data/modsec/modsecurity.conf` is the main modsec config file.
163
+
-`data/modsec/main.conf` is the main rules file, it has `Include` directives that load the actual rules
164
+
-`data/modsec` is symbolically linked to `/etc/nginx/modsec`
165
+
-------
166
+
# docker-compose.yaml
167
+
```
168
+
version: "3"
169
+
services:
170
+
npm:
171
+
#image: 'jc21/nginx-proxy-manager:latest'
172
+
image: 'baudneo/nginx-proxy-manager:latest'
173
+
restart: always
174
+
container_name: npm-crowdsec
175
+
ports:
176
+
# Public HTTP Port:
177
+
- '80:80'
178
+
# Public HTTPS Port:
179
+
- '443:443'
180
+
# Admin Web Port:
181
+
- '81:81'
182
+
environment:
183
+
# This is the default cert used to validate reCAPTCHA
184
+
SSL_CERTS_PATH: "/etc/ssl/certs/GTS_Root_R1.pem"
185
+
TZ: "America/Chicago"
186
+
ADMIN_PANEL_LOG: "1"
187
+
CROWDSEC_BOUNCER: "1"
188
+
OPENRESTY_DEBUG: "0"
189
+
190
+
CROWDSEC_LAPI: "http://IP TO CROWDSEC LOCAL API:8080"
191
+
CROWDSEC_KEY: "xxxxxxxxxxxxxxxxxxxxxxxx"
192
+
CROWDSEC_RECAP_SECRET: "XXXX"
193
+
CROWDSEC_RECAP_SITE: "XXXX"
194
+
# These are the settings to access your db
195
+
DB_MYSQL_HOST: "db"
196
+
DB_MYSQL_PORT: 3306
197
+
DB_MYSQL_USER: "npm-user"
198
+
DB_MYSQL_PASSWORD: "db user password"
199
+
DB_MYSQL_NAME: "npm"
200
+
# If you would rather use Sqlite uncomment this
201
+
# and remove all DB_MYSQL_* lines above
202
+
# DB_SQLITE_FILE: "/data/database.sqlite"
203
+
# Uncomment this if IPv6 is not enabled on your host
0 commit comments