-
Notifications
You must be signed in to change notification settings - Fork 1
Home
遇见王斌 edited this page May 15, 2022
·
5 revisions
Welcome to the butterfly_nginx wiki!
nginx docker
docker pull nginx
配置文件:/etc/nginx/nginx.conf
静态文件目录:/usr/share/nginx/html
Dockerfile:1.17.6
# https://github.com/nginxinc/docker-nginx/blob/master/stable/alpine/Dockerfile
FROM nginx:latest
ENV REFRESHED_AT 2019-12-11
COPY ./webroot/nginx.conf /etc/nginx/conf.d/default.conf
COPY ./webroot/static /usr/share/nginx/html/static
COPY ./webroot/templates /usr/share/nginx/html/templates
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
单点登录与普通登录时区别【Nginx 反向代理时】
# 单点登录
/auth/verification ------------- # 校验 jwt token ,此处验证失败时返回 401(此处 nginx 捕获到重定向到单点登录接口,在nginx 上进行配置)
/auth/ssologin ------------------# 单点登录接口
# 普通登录
/auth/verification ------------- # 校验 jwt token ,此处验证失败时返回 401(此处在 butterfly-fe 上进行捕获 https://github.com/meetbill/butterfly-fe )由前端跳转到 login 界面
/auth/login ---------------------# 普通登录接口