Skip to content

Nginx configuration to prevent DDoS Layer7 attacks.

License

Notifications You must be signed in to change notification settings

yuk1c/nginx-conf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Nginx configuration to speed up static websites and protect against Layer7 DDoS attacks.

📥 Installation

Clone the repository: git clone https://github.com/yuk1c/nginx-conf

Now stop your nginx: sudo systemctl stop nginx

Then rename your nginx config and replace it with our config (but before this we need root rights): cd /etc/nginx/ && mv nginx.conf nginx.old && mv ~/nginx-conf/nginx.conf $PWD

And now, you can start nginx again: sudo systemctl start nginx

⚙️ Configuration

All that you need - replace the worker_processes to your cpu threads * 2 If you want, you can configure SSL.

📋 Requirements

  • Ubuntu 20.04 or later
  • Nginx (we recommend latest stable version)
  • Apache2 running on 8080 port
  • Cloudflare