备份记录,随便笔记
#######################################################################
user nginx;
worker_processes 4;
worker_cpu_affinity 0001 0010 0100 1000;
error_log /var/log/nginx/error.log;
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;
#gzip on;
server {
listen 80;
server_name chint.weiwei.cn;
location /en {
proxy_pass http://192.168.0.1:8082;
}
location /pt {
proxy_pass http://192.168.0.2:8081;
}
location ~* /file-service {
client_max_body_size 100m;
proxy_pass http://172.19.6.133:8898;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
server {
listen 80;
server_name ecmp.weiwei.cn;
location / {
proxy_pass http://192.168.0.1:8081;
}
location ~* /file-service {
client_max_body_size 100m;
proxy_pass http:/192.168.0.2:8898;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}