
# 默认的工作进程 是由nobody用户去执行的, master由root执行
#user nobody;
# 工作进程的数量 默认为1
worker_processes 2;
# 用于配置日志的输出位置, 可以区分级别输出到不同的文件, 级别从低到高为
# debug info notice warn error crit
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
# 指定进程pid的位置
#pid logs/nginx.pid;
# 事件
events {
# 默认采用epoll
use epoll;
# 工作进程的最大客户端连接数
worker_connections 1024;
}
# http协议
http {
# 导入一个types文件, 里面基本都是请求类型
include mime.types;
# 默认type类型
default_type application/octet-stream;
# 日志格式化
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
# 日志位置
#access_log logs/access.log main;
# 提升文件传输效率
sendfile on;
# 当数据包累计到一定大小才进行发送,配合sendfile使用
#tcp_nopush on;
# 客户端连接服务器的超时时间(秒)
#keepalive_timeout 0;
keepalive_timeout 65;
# 输出数据压缩,压缩数据内容, 提高传输速度
#gzip on;
# 服务器
server {
# 监听端口
listen 80;
# 服务地址
server_name localhost;
# 字符集
#charset koi8-r;
# 该服务器的日志位置
#access_log logs/host.access.log main;
# 路由表
location / {
root html;
index index.html index.htm;
}
# 错误页面 404 状态时跳转到/404.html
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
# 500 502 503 504 状态时跳转到/50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
# 匹配到.php结尾的请求代理到 http://127.0.0.1
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}

【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
2021-09-06 16-SpringCloud Sleuth
2020-09-06 Activiti7 组任务
2020-09-06 Activiti7 流程变量(UEL-Value方式)
2020-09-06 Activiti7 流程变量(理论)