
nginx
poweljkflsabdfk
这个作者很懒,什么都没留下…
展开
-
nginx 配置跨域
nginx和服务端只能配置一处 location ~ ^/ { proxy_pass http://127.0.0.1:8080; include proxy.conf; # 指定允许跨域的方法,*代表所有 add_header Access-Control-Allow-Methods *; # 预检命令的缓存,如果不缓存每次会发送两次请求 ...原创 2022-03-22 11:10:49 · 296 阅读 · 0 评论 -
nginx 配置wss
location /wss/ { proxy_pass http://127.0.0.1:82/; #通过配置端口指向部署websocker的项目 proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header X-real-i...原创 2021-07-27 16:54:27 · 867 阅读 · 1 评论 -
nginx 配置
nginx 配置1.页面配置路径配置 location /html { #root /etc/nginx; #访问地址:/etc/nginx/html/index.html alias /etc/nginx; #访问地址:/etc/nginx/index.html index index.html; }...原创 2019-11-21 17:22:36 · 716 阅读 · 0 评论 -
nginx 负载均衡
nginx 负载均衡# weight=3 权重# backup 备用服务,不参与负载,除非其他的宕机 upstream tomcat_server{ server 127.0.0.1:8080 weight=3; server 127.0.0.1:8081 weight=1; } server { ...原创 2019-10-30 16:45:22 · 126 阅读 · 0 评论