ecology9-src4js-tools
Version:
src4js-tools
151 lines (117 loc) • 3.61 kB
Plain Text
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include 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 logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 9999;
server_name e9;
# node 服务地址 yarn start 启动的服务
set $e9_client http://127.0.0.1:3001;
# 后端接口服务
set $e9_server http://192.168.42.157:8888;
# 本地 ecology 目录
# set $e9_client /project4ec/DEMO/weaver_e9/ecology/wui;
root /Users/theoton/weaver/project/ecology_207;
location / {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /wui/index.html {
proxy_pass http://192.168.42.157:8888/wui/index.html;
}
# location /index.html {
# proxy_pass http://localhost:3000/index.html;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# }
# location /static {
# proxy_pass $e9_client;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# }
# location /sockjs-node {
# proxy_pass $e9_client;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# }
location /login {
proxy_pass $e9_server;
proxy_set_header Host $host:$server_port;
}
location /api {
proxy_pass $e9_server;
proxy_set_header Host $host:$server_port;
}
location /wui {
index wui;
}
location /font {
index font;
}
location /images {
index images;
}
location /spa {
index spa;
}
location /js {
index js;
}
location /social {
index social;
}
location /cloudstore {
index cloudstore;
}
}
# 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;
# }
#}
include servers/*;
}