Androidorios包文件以及异常管理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

61 lines
1.6 KiB

# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
# Load dynamic modules. See /usr/share/nginx/README.dynamic.
# include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
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;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
client_max_body_size 8M;
include /etc/nginx/mime.types;
default_type application/octet-stream;
upstream manager {
server managerservice:8086;
}
upstream rest {
server restservice:8084;
}
server {
listen 80 default_server;
server_name localhost; # 指定域名
location / {
try_files $uri $uri/ /index.html;
index index.html;
root /usr/share/nginx/html/; # 前端打包后的存储位置
allow all;
}
location ^~ /rest/ {
charset utf-8;
default_type application/json;
proxy_pass http://rest/; # 访问Rest接口Java后台
}
location ^~ /manager/ {
proxy_pass http://manager/; # 访问管理平台接口Java后台
}
}
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
}