首页 > 系统相关 >jumpserver nginx conf

jumpserver nginx conf

时间:2024-05-16 12:11:11浏览次数:25  
标签:set http header jumpserver nginx add proxy conf location

server {
listen 80;

client_max_body_size 2m; # 录像及文件上传大小限制

location /luna/ {
try_files $uri / /index.html;
alias /opt/luna/;
}

location /media/ {
add_header Content-Encoding gzip;
root /opt/jumpserver/data/;
}

location /static/ {
root /opt/jumpserver/data/;
}

location /socket.io/ {
proxy_pass http://localhost:5000/socket.io/;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
access_log off;
}

location /coco/ {
proxy_pass http://localhost:5000/coco/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
access_log off;
}

location /guacamole/ {
proxy_pass http://localhost:8081/;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
access_log off;
}

location / {
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

标签:set,http,header,jumpserver,nginx,add,proxy,conf,location
From: https://www.cnblogs.com/ruiy/p/18195693

相关文章

  • 阿里nginx error日志配置
    配置名称:nginx_sys_error_log_config 日志主题类型->文件路径提取->\/var\/log\/nginx\/(.*?)\/error.log文件路径:/var/log/nginx/    error.log  最大目录监控深度:2层日志样例:2024/01/2701:25:58[crit]221214#221214:*29786open()"/var/log/nginx/zhixiaoer......
  • openresty实现nginx+lua
    之前直接用nginx+lua,实在麻烦,用openresty简单多了。更简单的是用docker实现openresty,参考链接:Docker安装OpenResty,步骤如下:1、拉取镜像:dockerpullopenresty/openresty2、启动:dockerrun--nameopenresty-p80:80-dopenresty/openresty3、创建宿主机目录(用于映射进do......
  • 如何把 log4net.config 文件删除, 改成代码实现
    如何把log4net.config文件改成代码?这样在编写winform或者其他客户端的时候就省去了一个配置文件分享下我常用的log4net.config配置文件<?xmlversion="1.0"encoding="utf-8"?><configuration><!--<configSections><sectionname="log4net"typ......
  • Nginx配置允许跨域
    要在Nginx中配置允许跨域(Cross-OriginResourceSharing,CORS),你需要修改Nginx的配置文件(通常是nginx.conf或者某个包含在nginx.conf中的单独的配置文件)。下面是一个基本的例子,展示了如何在Nginx中设置CORS:打开你的Nginx配置文件。这通常是/etc/nginx/nginx.conf或者/etc/nginx......
  • Nginx的常用命令(启动重启停止等)
    Windows查看nginx的版本号:nginx-v启动nginx:startnginx快速停止或关闭nginx:nginx-sstop正常停止或关闭nginx:nginx-squit配置文件nginx.conf修改重装载命令:nginx-sreloadLinux进入nginx目录中cd/usr/local/nginx/sbin1、查看nginx版本号./nginx-v2、启......
  • nginx容器卷映射文件不生效
    问题:启动如下,当修改/data/nginx/conf/nginx.conf文件内容,执行dockerexec容器idnginx-sreload,登录容器里面查看是无法生效的,必须要重启容器才行dockerrun-d-p13700:13700\-v/data/www:/usr/local/nginx/html\-v/data/nginx/conf/nginx.conf:/usr/local/nginx/con......
  • Nginx配置https(证书)报错
    一、nginx配置问题nginx配置https的时候报错: nginx:[emerg]unknowndirective35+GAN"ssl"in/usr/local/nginx/conf/nginx.conf:28或者 nginx:[emerg]the"ssl"parameterrequiresngx_http_ssl_modulein/usr/loca....出现这个问题的时候可以检查一下是不是没有......
  • Docker 编译安装Nginx正向代理
    先记录一波正向代理#makebaseimage.FROMdebian:bookworm-20240423-slimASbaseLABELmaintainer="RocSun<[email protected]>"RUNrm-rf/etc/apt/sources.list.d/*\&&echo"">/etc/apt/sources.list\&&ech......
  • windows下volumetric video conference环境搭建
    最近在做volumetricvideo的rtc,在此记录下相关内容方便之后复习。所采用的endtoend平台来自于mmsys'24的ScalableMDC-BasedVolumetricVideoDeliveryforReal-TimeOne-to-ManyWebRTCConferencing.源码地址:https://github.com/MatthiasDeFre/webrtc-pc-streaming论文相......
  • nginx实用入门
    下载并启动下载地址:http://nginx.org/en/download.html双击即可启动测试启动:http://localhost/部署网站添加该条配置即可server{listen8088;server_name名字;location/{root文件目录;indexindex.htmlindex.htm;}}关闭、开始、重启在cmd下操作,进......