前端配置
准备开发工具 vscode + nodejs
Node版本
相关命令
进入ldapauth-ui
#构建依赖
npm install --registry=https://registry.npm.taobao.org
#本地启动
npm run dev
#打包
npm run build
得到静态dist目录文件放入nginx的html目录下即可,例如下入/root/ldapauth/nginx/html
nginx配置
server {
listen 6500;
listen [::]:6500;
server_name _;
location / {
root /root/ldapauth/nginx/html;
try_files $uri $uri/ /index.html;
}
#管理后端
location /ldap-api/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:6501/ldap-api/;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}