Skip to content

Commit

Permalink
a couple more nginx confs to make script kiddies struggle
Browse files Browse the repository at this point in the history
  • Loading branch information
papko26 committed Nov 24, 2024
1 parent 1d95e12 commit 9510ca6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=1r/s;
limit_conn_zone $binary_remote_addr zone=conn_limit:10m;


log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
Expand All @@ -25,6 +27,10 @@ http {
server {
listen 80;
server_name waze.papko.org;
server_tokens off;
limit_req zone=mylimit burst=5 nodelay;
limit_conn conn_limit 3;

location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
Expand All @@ -36,12 +42,14 @@ http {
server {
listen 443 ssl;
server_name waze.papko.org;
server_tokens off;
limit_req zone=mylimit burst=5 nodelay;
limit_conn conn_limit 3;

ssl_certificate /etc/letsencrypt/live/waze.papko.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/waze.papko.org/privkey.pem;

location / {
limit_req zone=mylimit burst=3 nodelay;
proxy_pass http://gtw:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down

0 comments on commit 9510ca6

Please sign in to comment.