Everyday DevOps
  • Home
  • One on One
  • Newsletter
  • About
Sign in Subscribe
Linux

Nginx Deny IP

  • Mark Allen

Mark Allen

29 Mar 2014

This is a quick way to deny an ip address accessing your nginx server.

Create a new file in /etc/nginx/conf.d called blockips.conf

Add the following to the file:

deny <bad ip>;

Then restart nginx.  The log file will now show 403's for the IP address.

For more info see:

http://www.cyberciti.biz/faq/linux-unix-nginx-access-control-howto/

Preventing Port Conflicts in Docker Compose with Dynamic Ports

Preventing Port Conflicts in Docker Compose with Dynamic Ports

Learn how to prevent port conflicts in Docker Compose by using dynamic ports instead of hardcoded ones. Improve your local development and CI workflows with this practical DevOps tip.
04 May 2025 22 min read
How to Write a Great README for Your Public GitHub Project

How to Write a Great README for Your Public GitHub Project

Learn how to write a great README for your public GitHub project. This guide covers installation, usage, development setup, publishing, and contribution best practices.
04 May 2025 2 min read
Supercharge Your Python Workflow with docker compose watch

Supercharge Your Python Workflow with docker compose watch

Learn how to use docker compose watch in a Python project to automatically restart on code changes and rebuild on requirements updates. Boost your DevOps workflow with this modern Docker setup
04 May 2025 2 min read
Everyday DevOps © 2025
  • Sign up
  • Book some time
  • Newsletter
Powered by Ghost