nginx-configuration by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill nginx-configuration掌握适用于生产级 Web 服务器、反向代理、负载均衡、SSL 终止、缓存和 API 网关模式的 Nginx 配置,并进行高级性能调优。
最小化工作示例:
# /etc/nginx/nginx.conf
user nginx;
worker_processes auto;
worker_rlimit_nofile 65535;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 4096;
use epoll;
multi_accept on;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Logging
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format upstream_time '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
// ... (完整实现请参阅参考指南)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
references/ 目录下的详细实现:
| 指南 | 内容 |
|---|---|
| 生产环境 Nginx 配置 | 生产环境 Nginx 配置 |
| 带负载均衡的 HTTPS 服务器 | 带负载均衡的 HTTPS 服务器 |
| Nginx 配置脚本 | Nginx 配置脚本 |
| Nginx 监控配置 | Nginx 监控配置 |
每周安装数
276
代码仓库
GitHub 星标数
121
首次出现
2026年1月21日
安全审计
安装于
opencode226
gemini-cli221
codex214
github-copilot199
claude-code181
cursor179
Master Nginx configuration for production-grade web servers, reverse proxies, load balancing, SSL termination, caching, and API gateway patterns with advanced performance tuning.
Minimal working example:
# /etc/nginx/nginx.conf
user nginx;
worker_processes auto;
worker_rlimit_nofile 65535;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 4096;
use epoll;
multi_accept on;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Logging
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format upstream_time '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Production Nginx Configuration | Production Nginx Configuration |
| HTTPS Server with Load Balancing | HTTPS Server with Load Balancing |
| Nginx Configuration Script | Nginx Configuration Script |
| Nginx Monitoring Configuration | Nginx Monitoring Configuration |
Weekly Installs
276
Repository
GitHub Stars
121
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode226
gemini-cli221
codex214
github-copilot199
claude-code181
cursor179
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
66,100 周安装