@@ -36,6 +36,7 @@ PastedIR/
3636├── 📁 templates/ # HTML templates
3737├── 📁 static/ # CSS, JS, images
3838├── 📁 compose/ # Docker configurations
39+ ├── 📁 nginx-configs/ # Nginx configuration templates
3940├── 🐳 docker-compose.yml # Container orchestration
4041└── 📄 pyproject.toml # Python dependencies
4142```
@@ -96,6 +97,46 @@ python manage.py runserver
9697python manage.py scheduler_worker default
9798```
9899
100+ ## 🌐 Nginx Configuration
101+
102+ The project includes pre-configured Nginx templates for production deployment:
103+
104+ ### Configuration Files
105+ - ` nginx-configs/example.nginx.conf ` - Main Nginx configuration
106+ - ` nginx-configs/example.default.conf ` - Server block configuration with:
107+ - Rate limiting zones
108+ - SSL/TLS configuration
109+ - Security headers (CSP, HSTS, etc.)
110+ - Bot server IP whitelisting
111+ - Static file serving optimization
112+
113+ ### Setup Instructions
114+ 1 . Copy the example configurations to your Nginx directory:
115+ ``` bash
116+ sudo cp nginx-configs/example.nginx.conf /etc/nginx/nginx.conf
117+ sudo cp nginx-configs/example.default.conf /etc/nginx/sites-available/pasted.ir
118+ ```
119+
120+ 2 . Update the configuration files:
121+ - Replace ` example.com ` with your domain
122+ - Update SSL certificate paths
123+ - Configure your bot server IP in the whitelist
124+ - Adjust rate limiting settings as needed
125+
126+ 3 . Enable the site:
127+ ``` bash
128+ sudo ln -s /etc/nginx/sites-available/pasted.ir /etc/nginx/sites-enabled/
129+ sudo nginx -t
130+ sudo systemctl reload nginx
131+ ```
132+
133+ ### Features
134+ - ** Rate Limiting** : Separate zones for API, create endpoints, and general traffic
135+ - ** Bot Whitelisting** : IP-based and token-based bot authentication
136+ - ** Security Headers** : Comprehensive CSP, HSTS, and other security headers
137+ - ** Static File Optimization** : Efficient serving of CSS, JS, and media files
138+ - ** SSL/TLS** : Production-ready HTTPS configuration
139+
99140## ⚙️ Configuration
100141
101142### Environment Variables
0 commit comments