群晖 nginx Reverse-proxy-websocket群晖 nginx Reverse-proxy-websocket群晖 nginx Reverse-proxy-websocket群晖 nginx Reverse-proxy-websocket
  • 首页
  • 博客
  • 书签
  • 文件
  • 分析
  • 登录

群晖 nginx Reverse-proxy-websocket

发表 admin at 2022年1月31日
类别
  • NAS
标签

窗体顶端

窗体底端

orobardet/dsm-reverse-proxy-websocket

 

Configuration fix for Synology DSM 6 reverse proxy to handle websocket

 

Latest commit

@orobardet

orobardet Add information about WS compatibility on DSM 6.2.1

Latest commit0988e08on 27 Sep 2018

Files

Type

Name

Latest commit message

Commit time

Portal.mustache

Update Portal.mustache to v6.1.6-15266

2 years ago

Portal.mustache.dist

Update Portal.mustache.dist to v6.1.6-15266

2 years ago

README.md

Add information about WS compatibility on DSM 6.2.1

2 years ago

 README.md

dsm-reverse-proxy-websocket

Configuration fix for Synology DSM 6 reverse proxy to handle websocket

Starting from DSM 6.2.1, this modification is no longer required, as Application Portail has an option to handle websocket.
It's even not recommended to modify your 
Portal.mustache file, as it will cause error when adding or edition reverse proxy entries in Application Portal.

In DSM 6.2.1+, when editing a reverse proxy entry in Application Portal, go to "custom headers" tab and click the arrow on the "Create" button, then "Websocket". This will add the required headers for websocket to this reverse proxy.

BACKUP YOUR portal.mustache BEFORE MODIFYING IT!

You need to edit the file /usr/syno/share/nginx/Portal.mustache to add the followings in the location section:

proxy_set_header Upgrade $http_upgrade;

proxy_set_header Connection "upgrade";

proxy_read_timeout 86400;

Then restart the httpd with:

sudo synoservicecfg --restart nginx

This will restart ALL http service running, not only reverse proxy, as a single instance of NGinX runs everything.

A modified Portal.mustache is provided in this repo (warning: based on DSM 6.1.6-15266).

Known DSM upgrade impacts on the Portal.mustache file

In bold versions overwriting the Portal.mustache

  • 6.2.1-23824 : overwrites the Portal.mustache with a completly new template. Starting from this version, hacking files are not required anymore as Application Portail reverse proxy feature now has an option to handle websocker.
  • 6.2-23739 : overwrites the Portal.mustache
  • 6.1.7-15284 : overwrites the Portal.mustache
  • 6.1.6-15266-1 : leaves the Portal.mustache file unchange
  • 6.1.6-15266 : overwrites the Portal.mustache
  • 6.1.3-15152-1 : leaves the Portal.mustache file unchange
  • 6.1.3-15152 : overwrites the Portal.mustache
  • 6.1.2-15132 : overwrites the Portal.mustache
  • 6.1.1-15101-4 : leaves the Portal.mustache file unchange
  • 6.1.1-15101 : overwrites the Portal.mustache
  • © 2020 GitHub, Inc.

 

发表回复 取消回复

要发表评论,您必须先登录。

类别

  • Cat
  • Python
  • Django
  • Database
  • Html/CSS
  • JavaScript
  • Vue
  • RegExp
  • Maths/AI
  • PHP/Wordpress
  • Practice
  • Linux
  • Windows
  • Android
  • NAS
  • Software
  • Hardware
  • Network
  • SEO
  • English
  • Games
  • Recipes
  • General
  • Memorandum
  • Essays
  • 未分类

归档

©2015-2023 艾丽卡 Blog support@alaica.com
      ajax-loader