我能为你提供什么服务?
网站建设 | 小程序开发 | 软件定制
我是鹏魔王,一个做网站、小程序的程序员,记录生活日常、及技术分享。
本欲起身离红尘,奈何影子落人间,欢迎关注,祝大家早日实现财务自由!
Nginx 有很多使用场景:比如反向代理、负载均衡、动静分离、跨域等等
今天发现一个可以一键生成 Nginx 配置的工具
怎么说呢,高手用不上,新手可以参考参考


选择你的场景,填写好参数,系统就会自动生成配置文件
# Generated by nginxconfig.io# See nginxconfig.txt for the configuration share linkuser www-data;pid /run/nginx.pid;worker_processes auto;worker_rlimit_nofile 65535;# Load modulesinclude /etc/nginx/modules-enabled/*.conf;events {multi_accept on;worker_connections 65535;}http {charset utf-8;sendfile on;tcp_nopush on;tcp_nodelay on;server_tokens off;log_not_found off;types_hash_max_size 2048;types_hash_bucket_size 64;client_max_body_size 16M;# MIMEinclude mime.types;default_type application/octet-stream;# Loggingaccess_log off;error_log /dev/null;# SSLssl_session_timeout 1d;ssl_session_cache shared:SSL:10m;ssl_session_tickets off;# Diffie-Hellman parameter for DHE ciphersuitesssl_dhparam /etc/nginx/dhparam.pem;# Mozilla Intermediate configurationssl_protocols TLSv1.2 TLSv1.3;ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;# OCSP Staplingssl_stapling on;ssl_stapling_verify on;resolver 1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4 208.67.222.222 208.67.220.220 valid=60s;resolver_timeout 2s;# Load configsinclude /etc/nginx/conf.d/*.conf;include /etc/nginx/sites-enabled/*;}
官网:
https://nginxconfig.io
【软件推荐】轻量级 Nginx 访问日志分析与可视化面板——nginxpulse
Nginx配置实战:Vue项目部署 + API代理 + WebSocket+ 静态缓存,含详细中文注释,适用于前后端分离的Vue项目部署