nginx 常用配置
来源:互联网 发布:vm虚拟机没有网络 编辑:程序博客网 时间:2024/05/29 15:19
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
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 /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
client_max_body_size 500m;
/*开启压缩*/
gzip on;
gzip_disable "MSIE [1-6].";
gzip_types text/plain application/x-javascript text/css text/javascript;
include /etc/nginx/conf.d/*.conf;
/* 本地APP server */
upstream tomcat{
server 127.0.0.1:8080;
}
server {
listen 80;
server_name 自己的IP或者域名;
charset UTF-8;
access_log on;
location / {
proxy_pass tomcat;/* 本地APP server */
proxy_http_version 1.1;
include proxy.conf;
}
//配置虚拟映射
location /data/{
alias /data;
}
}
}
0 0
- Nginx的常用配置
- Nginx 常用配置
- 常用的nginx 配置
- Nginx常用配置实例
- nginx 常用配置
- nginx常用配置
- nginx常用代理配置
- Nginx常用配置总结
- Nginx常用配置
- nginx常用代理配置
- nginx 常用配置
- nginx虚拟主机常用配置
- nginx常用配置
- Nginx 常用配置
- Nginx常用代理配置
- nginx常用代理配置
- nginx 常用配置
- 【Nginx】常用功能配置
- Linux 设备驱动 一
- 架构师趣味回答 java
- CSDN博客导出(二) - 解析HTML
- Android中利用Handler实现消息的分发机制(二)
- Leetcode - 广度优先遍历
- nginx 常用配置
- Linux中iptables设置详细
- Objective-C 内存管理
- android actionbar自定义样式so easy(一)
- Android APK反编译详解(附图)
- linux下IPTABLES配置详解
- QAxContainerd.lib(qaxbase.obj) : error LNK2038: 检测到“_ITERATOR_DEBUG_LEVEL”的不匹配项: 值“2”不匹配值“0”(DlgCont
- typedef int(init_fnc_t) (void) 和 typedef int(*init_fnc_t) (void)
- dizhi