基于nginx 动态 URL反向代理的实现

背景:

        我们在项目中在这样一个场景,用户需要使用固定的软件资源,这些资源是以服务器或者以容器形式存在的。

        资源以webAPI方式在内网向外提供接口,资源分类多种类型,每种类型的资源程序和Wapi参数都一样。这些资源部属完成后使用IP+端口进行区分。如下表所示

     

技术分析:

经过调研分析,发现Nginx 可以进行么向代理,代理后可以进行调度到内部的数据

技术验证:

1.使用静态方式在配置文件中直接写入

如下:

server {listen        22280;server_name  localhost;root   "D:/dist";location / {index index.php index.html error/index.html;error_page 400 /error/400.html;error_page 403 /error/403.html;error_page 404 /error/404.html;error_page 500 /error/500.html;error_page 501 /error/501.html;error_page 502 /error/502.html;error_page 503 /error/503.html;error_page 504 /error/504.html;error_page 505 /error/505.html;error_page 506 /error/506.html;error_page 507 /error/507.html;error_page 509 /error/509.html;error_page 510 /error/510.html;#include D:/Git/111/nginx.htaccess;autoindex  off;try_files $uri $uri/ @router; #需要指向下面的@router否则会出现vue的路由在nginx中刷新出现404index  index.html index.htm;}#反向代理 location /r1/ {     proxy_pass http://192.168.1.88:888/;            }location /r2/ {     proxy_pass http://192.168.1.88:887/;            }location /i1/ {     proxy_pass http://192.168.1.89:3333/;            }location /i2/ {     proxy_pass http://192.168.1.90:3333/;            }#对应上面的@router,主要原因是路由的路径资源并不是一个真实的路径,所以无法找到具体的文件#因此需要rewrite到index.html中,然后交给路由在处理请求资源location @router {rewrite ^.*$ /index.html last;}location ~ \.php(.*)$ {fastcgi_pass   127.0.0.1:9000;fastcgi_index  index.php;fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;fastcgi_param  PATH_INFO  $fastcgi_path_info;fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;include        fastcgi_params;}
}

使用此方式可以达到所需效果,但如果资源变化需要手动调整Nginx的配置文件。因此考虑有没有一种办法可以做到动态转发呢?

问题难点:

1.资源需要一定的规律性

2.nginx动态转发功能技术上需要进行预研,明确是否可行

实现过程:

1.确定方案

方案里我们准备采用 固定内容+端口号的形式来进行处理,在此之前我们需要把服务用K8S映射到

同一IP或者同一规则的内容上。并且对URL进行了定义 /rs/(\d+)/实际API  的形式进行调用

2.方案实现

我们假定所有的 k8s 把所有的服务地址都映射到了 192.168.1.88上,仅端口不同,使用不同的端口就可以调度到不同的服务。

部分配置如下:

		location /rs/(\d.+)/ {     proxy_pass http://localhost:$/;            }

运行报错 http 500

500 Internal Server Error
nginx/1.15.11
问题处理:
2024/03/22 17:07:35 [error] 5072#34752: *264 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:07:35 [error] 5072#34752: *265 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:08:15 [error] 5072#34752: *268 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:08:16 [error] 5072#34752: *269 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:08:16 [error] 5072#34752: *270 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:08:17 [error] 5072#34752: *271 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:09:24 [error] 5072#34752: *273 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:09:24 [error] 5072#34752: *274 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:09:25 [error] 5072#34752: *275 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:09:26 [error] 5072#34752: *276 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:09:27 [error] 5072#34752: *277 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:09:27 [error] 5072#34752: *278 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:09:35 [error] 5072#34752: *283 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:09:36 [error] 5072#34752: *284 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:09:36 [error] 5072#34752: *285 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:09:37 [error] 5072#34752: *286 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:09:38 [error] 5072#34752: *287 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:09:38 [error] 5072#34752: *288 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280"
2024/03/22 17:10:00 [error] 5072#34752: *279 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /uuu/60000/api/sysAuth/index.html HTTP/1.1", upstream: "http://192.168.27.51:60000/", host: "127.0.0.1:280"
2024/03/22 17:10:00 [error] 5072#34752: *279 rewrite or internal redirection cycle while processing "/index.html", client: 127.0.0.1, server: localhost, request: "GET /uuu/60000/api/sysAuth/index.html HTTP/1.1", upstream: "http://192.168.27.51:60000/", host: "127.0.0.1:280"
2024/03/22 17:10:01 [error] 5072#34752: *280 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280", referrer: "http://127.0.0.1:280/uuu/60000/api/sysAuth/index.html"
2024/03/22 17:11:05 [error] 5072#34752: *290 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /uuu/60000/api/sysAuth/index.html HTTP/1.1", upstream: "http://192.168.27.51:60000/", host: "127.0.0.1:280"
2024/03/22 17:11:05 [error] 5072#34752: *290 rewrite or internal redirection cycle while processing "/index.html", client: 127.0.0.1, server: localhost, request: "GET /uuu/60000/api/sysAuth/index.html HTTP/1.1", upstream: "http://192.168.27.51:60000/", host: "127.0.0.1:280"
2024/03/22 17:11:05 [error] 5072#34752: *293 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "127.0.0.1:280", referrer: "http://127.0.0.1:280/uuu/60000/api/sysAuth/index.html"
2024/03/22 17:14:18 [error] 8748#17732: *1 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /uuu/60000/index.html HTTP/1.1", upstream: "http://192.168.27.51:60000/uuu/60000/index.html", host: "localhost:280"
2024/03/22 17:14:18 [error] 8748#17732: *1 rewrite or internal redirection cycle while processing "/index.html", client: 127.0.0.1, server: localhost, request: "GET /uuu/60000/index.html HTTP/1.1", upstream: "http://192.168.27.51:60000/uuu/60000/index.html", host: "localhost:280"
2024/03/22 17:14:19 [error] 8748#17732: *5 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "localhost:280", referrer: "http://localhost:280/uuu/60000/index.html"
2024/03/22 17:15:59 [error] 12116#31400: *4 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /uuu/60000/aaaa HTTP/1.1", upstream: "http://192.168.27.51:60000/", host: "localhost:280"
2024/03/22 17:15:59 [error] 12116#31400: *4 rewrite or internal redirection cycle while processing "/index.html", client: 127.0.0.1, server: localhost, request: "GET /uuu/60000/aaaa HTTP/1.1", upstream: "http://192.168.27.51:60000/", host: "localhost:280"
2024/03/22 17:15:59 [error] 12116#31400: *7 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "localhost:280", referrer: "http://localhost:280/uuu/60000/aaaa"
2024/03/22 17:20:20 [error] 33904#20644: *1 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while reading response header from upstream, client: 127.0.0.1, server: localhost, request: "GET /uuu/60000/api/sysAuth/captcha HTTP/1.1", upstream: "http://192.168.27.51:60000/", host: "localhost:280"
2024/03/22 17:20:20 [error] 33904#20644: *1 rewrite or internal redirection cycle while processing "/index.html", client: 127.0.0.1, server: localhost, request: "GET /uuu/60000/api/sysAuth/captcha HTTP/1.1", upstream: "http://192.168.27.51:60000/", host: "localhost:280"
2024/03/22 17:20:20 [error] 33904#20644: *4 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "localhost:280", referrer: "http://localhost:280/uuu/60000/api/sysAuth/captcha"
2024/03/22 17:24:31 [error] 41040#27804: *2 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "localhost:280", referrer: "http://localhost:280/uuu/5257/api/sysAuth/captcha"
2024/03/22 17:24:35 [error] 41040#27804: *4 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /_framework/aspnetcore-browser-refresh.js HTTP/1.1", host: "localhost:280", referrer: "http://localhost:280/uuu/5257/index.html"
2024/03/22 17:24:35 [error] 41040#27804: *11 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /index-mini-profiler/includes.min.js?v=4.3.8+1120572909 HTTP/1.1", host: "localhost:280", referrer: "http://localhost:280/uuu/5257/index.html"
2024/03/22 17:24:35 [error] 41040#27804: *12 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /_vs/browserLink HTTP/1.1", host: "localhost:280", referrer: "http://localhost:280/uuu/5257/index.html"
2024/03/22 17:24:35 [error] 41040#27804: *13 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /swagger/%E5%85%AC%E5%85%B1%E6%9C%8D%E5%8A%A1/swagger.json HTTP/1.1", host: "localhost:280", referrer: "http://localhost:280/uuu/5257/index.html"
2024/03/22 17:35:40 [error] 41512#41416: *8 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /_framework/aspnetcore-browser-refresh.js HTTP/1.1", host: "localhost:280", referrer: "http://localhost:280/area/5257/index.html"
2024/03/22 17:35:40 [error] 41512#41416: *10 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /_vs/browserLink HTTP/1.1", host: "localhost:280", referrer: "http://localhost:280/area/5257/index.html"
2024/03/22 17:35:40 [error] 41512#41416: *9 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /index-mini-profiler/includes.min.js?v=4.3.8+1120572909 HTTP/1.1", host: "localhost:280", referrer: "http://localhost:280/area/5257/index.html"
2024/03/22 17:35:40 [error] 41512#41416: *2 rewrite or internal redirection cycle while redirect to named location "@router", client: 127.0.0.1, server: localhost, request: "GET /swagger/%E5%85%AC%E5%85%B1%E6%9C%8D%E5%8A%A1/swagger.json HTTP/1.1", host: "localhost:280", referrer: "http://localhost:280/area/5257/index.html"

通过日志发现存在循环引用之类的

考虑使用URL重写改变下,路径。再使用proxy_pass反向代理。尝试修改nginx并进行修改。

问题解决
location ~ ^/rs/(\d.+)/{rewrite ^/rs/(\d+)/(.*)$ /$2 break;proxy_pass http://192.168.1.88:$1;  }

最终结果能够正常转发到指定端口,并且nginx 也不用修改配置,实现了动态端口反向代理。

在这个过程中我发现要实现/dir/port/xxx 这种进行反向代理必须与url重写结合使用。不然会报404.

完整能够成功运行的配置nginx.conf如下

server {listen        22280;server_name  localhost;root   "D:/dist";location / {index index.php index.html error/index.html;error_page 400 /error/400.html;error_page 403 /error/403.html;error_page 404 /error/404.html;error_page 500 /error/500.html;error_page 501 /error/501.html;error_page 502 /error/502.html;error_page 503 /error/503.html;error_page 504 /error/504.html;error_page 505 /error/505.html;error_page 506 /error/506.html;error_page 507 /error/507.html;error_page 509 /error/509.html;error_page 510 /error/510.html;#include D:/Git/111/nginx.htaccess;autoindex  off;try_files $uri $uri/ @router; #需要指向下面的@router否则会出现vue的路由在nginx中刷新出现404index  index.html index.htm;}#反向代理 location ~ ^/rs/(\d.+)/{rewrite ^/rs/(\d+)/(.*)$ /$2 break;proxy_pass http://192.168.1.88:$1;  }#对应上面的@router,主要原因是路由的路径资源并不是一个真实的路径,所以无法找到具体的文件#因此需要rewrite到index.html中,然后交给路由在处理请求资源location @router {rewrite ^.*$ /index.html last;}location ~ \.php(.*)$ {fastcgi_pass   127.0.0.1:9000;fastcgi_index  index.php;fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;fastcgi_param  PATH_INFO  $fastcgi_path_info;fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;include        fastcgi_params;}
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/771096.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

学习SpringBoot笔记--知识点(1)

目录 SpringBoot介绍 创建一个最基础的springbooot项目 使用Spring Initializr创建springboot项目 Spring Boot 自动配置机制 SpringBoot常用注解 1.组件注册 2.条件注解 3.属性绑定 SpringBoot自动配置流程​编辑 学习SpringBoot的方法 ​编辑 SpringBoot日志配置…

2015年认证杯SPSSPRO杯数学建模A题(第一阶段)绳结全过程文档及程序

2015年认证杯SPSSPRO杯数学建模 A题 绳结 原题再现: 给绳索打结是人们在日常生活中常用的技能。对登山、航海、垂钓、野外生存等专门用途,结绳更是必不可少的技能之一。针对不同用途,有多种绳结的编制方法。最简单的绳结,有时称…

PyCharm环境下Git与Gitee联动:本地与远程仓库操作实战及常见问题解决方案

写在前面:本博客仅作记录学习之用,部分图片来自网络,如需引用请注明出处,同时如有侵犯您的权益,请联系删除! 文章目录 前言下载及安装GitGit的使用设置用户签名设置用户安全目录Git基本操作Git实操操作 Pyc…

SpringBoot+Vue前后端分离项目在Linux系统中基于Docker打包发布,并上传镜像到阿里镜像私仓

文章目录 SpringBootVue前后端分离项目在Linux系统中基于Docker打包发布,并上传镜像到阿里镜像私仓一、Java项目基于Docker打包发布1.打包应用,将打好的jar包放到我们的linux系统中2.新建dockerfile3.打包镜像4.测试运行5.上传镜像到阿里云免费私仓 二、…

Webpack生成企业站静态页面 - 项目搭建

现在Web前端流行的三大框架有Angular、React、Vue,很多项目经过这几年的洗礼,已经都 转型使用这三大框架进行开发,那为什么还要写纯静态页面呢?比如Vue中除了SPA单页面开发,也可以使用nuxt.js实现SSR服务端渲染&#x…

基于前端技术实现的全面预算编制系统

前言 在现代商业环境中,预测销售数据和实际成本是每个公司CEO和领导都极为重视的关键指标。然而,由于市场的不断变化,准确地预测和管理这些数据变得愈发具有挑战性。为了应对这一挑战,建立一个高效的系统来管理和审查销售数据的重…

hbase启动错误-local host is“master:XXXX“ destination is:master

博主的安装前提: zookeeper安装完成,且启动成功 hdfs高可用安装,yarn高可用安装,且启动成功 报错原因:端口配置不对 解决方案: 输入:hdfs getconf -confKey fs.default.name 然后把相应的…

考研数学一——概率论真题——自我总结题型整理(总分393)

系列文章目录 终于考完研了,本人考的是南京航空航天大学的仪器科学与技术,英一数一电路,以下是成绩单: 平时习惯整理自己的学习体系,以下是一个记录。 其实,每个人都应该训练,看到某一类题目…

2024/03/25(C++·day1)

一、思维导图 二、练习 练习一 定义自己的命名空间&#xff0c;其中有string类型的变量&#xff0c;再定义两个函数&#xff0c;一个函数完成字符串的输入&#xff0c;一个函数完成求字符串长度&#xff0c;再定义一个全局函数完成对该字符串的反转 #include <iostream&g…

# vue刷新当前页面

vue刷新当前页面 背景 在项目开发中遇到了需要刷新当前页面的场景。中途尝试了以下四种方法 1、this. f o r c e U p d a t e ( ) t h i s . forceUpdate() this. forceUpdate()this.forceUpdate() 是Vue.js中的一个方法&#xff0c;用于强制组件重新渲染&#xff0c;即使没有…

景联文科技上新高质量大模型训练数据!

在过去的一年中&#xff0c;人工智能领域呈现出了风起云涌的态势&#xff0c;其中模型架构、训练数据、多模态技术、超长上下文处理以及智能体发展等方面均取得了突飞猛进的发展。 在3月24日举办的2024全球开发者先锋大会的大模型前沿论坛上&#xff0c;上海人工智能实验室的领…

【Android】美团组件化路由框架WMRouter源码解析

前言 Android无论App开发还是SDK开发&#xff0c;都绕不开组件化&#xff0c;组件化要解决的最大的问题就是组件之间的通信&#xff0c;即路由框架。国内使用最多的两个路由框架一个是阿里的ARouter&#xff0c;另一个是美团的WMRouter。这两个路由框架功能都很强大&#xff0…

一篇文章,告别Flutter状态管理争论,问题和解决

起因 每隔一段时间&#xff0c;都会出现一个新的状态管理框架&#xff0c;最近在YouTube上也发现了有人在推signals, 一个起源于React的状态管理框架&#xff0c;人们总是乐此不疲的发明各种好用或者为了解决特定问题而产生的方案&#xff0c;比如Bloc, 工具会推陈出新&#x…

[Vue warn]: Invalid vnode type when creating vnode: false

如题&#xff0c;意思是创建vnode时&#xff0c;vnode类型无效:false。 根据右边的索引点进去&#xff0c;发现定位的是组件loading。搜索loading发现声明了变量loading&#xff0c;更改后问题消失。

【python】获取4K壁纸保存到本地文件夹【附源码】

图片信息丰富多彩&#xff0c;许多网站上都有大量精美的图片资源。有时候我们可能需要批量下载这些图片&#xff0c;而手动一个个下载显然效率太低。因此&#xff0c;编写一个简单的网站图片爬取程序可以帮助我们高效地获取所需的图片资源。 目标网站&#xff1a; 如果出现模…

物联网云组态是什么?部署物联网云组态有什么作用?

在信息化与工业化的深度融合进程中&#xff0c;物联网云组态以其独特的优势&#xff0c;正在成为企业数字化转型的重要工具。那么&#xff0c;物联网云组态究竟是什么呢&#xff1f;部署物联网云组态又能给企业带来哪些实质性的好处呢&#xff1f;今天&#xff0c;我们将围绕这…

vue 消息左右滚动(前后无缝衔接)

之前一直用vue-seamless-scroll&#xff0c;无奈此组件有两个缺点不满足实际效果&#xff1a;1&#xff09;标题过长被截取、2&#xff09;标题果断也会滚动&#xff0c;无奈我自己封装一个&#xff0c;满足此两个弊端&#xff0c;也能达到vue-seamless-scroll组件的功能&#…

AI:Nvidia官网人工智能大模型工具合集(文本生成/图像生成/视频生成)的简介、使用方法、案例应用之详细攻略

AI&#xff1a;Nvidia官网人工智能大模型工具合集(文本生成/图像生成/视频生成)的简介、使用方法、案例应用之详细攻略 目录 Nvidia官网人工智能大模型工具合集的简介 1、网站主要功能包括: Nvidia官网人工智能大模型工具合集的使用方法 1、SDXL-Turbo的使用 2、GEMMA-7B的…

详解 net user

net user 是 Windows 操作系统自带的一个命令行工具&#xff0c;用于管理和查询本地用户账户信息。在域环境中&#xff0c;它可以用于管理本地用户账户&#xff0c;但对域用户账户的操作能力有限&#xff0c;尤其是查看域账户锁定状态等功能。以下是 net user 命令的详解&#…

【学习】Web安全测试需要考虑哪些情形

一、数据加密 某些数据需要进行信息加密和过滤后才能在客户端和服务器之间进行传输&#xff0c;包括用户登录密码、信用卡信息等。例如&#xff0c;在登录某银行网站时&#xff0c;该网站必须支持SSL协议&#xff0c;通过浏览器访问该网站时&#xff0c;地址栏的http变成https…