
运维服务
docker离线安装
一、准备工作:确认架构并下载安装包 1.1 确认目标服务器架构 在目标服务器上执行以下命令,确认系统架构: 输出 x8664:对应 amd64 架构(Intel/AMD 64位服务
[root@www.wulaoer.org conf.d]# cat nginx.conf
user work;
worker_processes auto;
worker_cpu_affinity auto;
worker_rlimit_nofile 512000;
error_log logs/error.log warn;
pid ./var/nginx.pid;
events {
use epoll;
worker_connections 512000;
}
http {
include mime.types;
default_type application/octet-stream;
variables_hash_bucket_size 1024;
server_names_hash_bucket_size 128;
client_header_buffer_size 16k;
large_client_header_buffers 4 32k;
client_max_body_size 32M;
client_body_buffer_size 10M;
keepalive_timeout 60;
keepalive_requests 1000;
#client_header_timeout 60;
#client_body_timeout 60;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
#root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location /tomcat01 {
proxy_pass http://127.0.0.1:18080;
}
location /tomcat02 {
proxy_pass http://127.0.0.1:28080;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
}
参考一下nginx的默认配置文件:https://www.wulaoer.org/?p=318 在这里关于nginx的上传文件大小限制住要取决于
client_max_body_size 32M;默认限制的文件大小是32M,如果我们想增加或者减少只需要修改后面的参数即可,这里注意,client_max_body_size可以在http下也可以在server下,但是不能在location下。在http下是真对nginx中所有的代理都生效,前提是域名配置的server中没有配置client_max_body_size,如果有就会根据自己域名配置文件的大小为准。
评论 0