
1./app/nginx-1.12.2/conf
#user nobody; worker_processes 1; error_log log/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; pid log/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; include sites/*.conf; }
2./app/nginx-1.12.2/conf/sites
server { listen 80; server_name localhost; proxy_set_header Host $host; proxy_set_header Referer $http_referer; proxy_set_header Cookie $http_cookie; proxy_set_header X_Real_IP $remote_addr; proxy_set_header X_Forwarded_For $proxy_add_x_forwarded_for; proxy_send_timeout 180s; proxy_read_timeout 180s; location / { root /app/grid-frontend; } location /grid { proxy_cookie_path /grid/ /; proxy_pass http://localhost:8080/grid/; } }
3.前端代码
/app/grid-frontend
4.后端代码
/app/grid-backend
5.在后端代码中配置启动文件
/app/grid-backend/start.sh
nohup java -jar grid-web-1.0.0-SNAPSHOT.jar &
人吐槽 | 人点赞 |
发表评论