Skip to content

Instantly share code, notes, and snippets.

@kukat
Last active February 2, 2020 08:50
Show Gist options
  • Save kukat/e22085988568135390c4bebfebf2e975 to your computer and use it in GitHub Desktop.
Save kukat/e22085988568135390c4bebfebf2e975 to your computer and use it in GitHub Desktop.
chainedbox omv config `/opt/etc/nginx/vhost/navi.conf` and `/opt/wwwroot/navi/index.php`
<meta name="referrer" content="never">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="/favicon.ico">
<link rel="stylesheet" type="text/css" href="css/style.css" />
<title>粒子云服务器</title>
</head>
<body>
<div id="wrap">
<div id="logo">
<img class="logo" src="img/logo.png">
<!-- <h1>粒子云服务器</h1> -->
<div id="kg-btn" class="">
<input class='tgl tgl-flip' id='qieh' type='checkbox' />
</div>
</div>
<div id="main">
<!-- 外网访问地址 -->
<div id="app" class="app animated fadeInLeft">
<ul>
<li>
<a href="omv/" target="_blank"><img class="shake" src="img/png/Settings.png" /><strong>控制台</strong></a>
</li>
<li>
<a href="kode/" target="_blank"><img class="shake" src="img/png/iCloud-Drive.png" /><strong>可道云</strong></a>
</li>
<li>
<a href="qbt/" target="_blank"><img class="shake" src="img/png/qb.png" /><strong>qBittorrent</strong></a>
</li>
<li>
<a href="lychee/" target="_blank"><img class="shake" src="img/png/Photos.png" /><strong>相册</strong></a>
</li>
<li>
<a href="jellyfin/" target="_blank"><img class="shake" src="img/png/jellyfin.png" /><strong>视频</strong></a>
</li>
<li>
<a href="tz/" target="_blank"><img class="shake" src="img/png/tz.png" /><strong>探针</strong></a>
</li>
<li>
<a href="ariang/" target="_blank"><img class="shake" src="img/png/Downloads.png" /><strong>AriaNg</strong></a>
</li>
<li>
<a href="office/" target="_blank"><img class="shake" src="img/png/office.png" /><strong>OFFICE</strong></a>
</li>
<li>
<a href="bt/web/" target="_blank"><img class="shake" src="img/png/Transmission.png" /><strong>Transmission</strong></a>
</li>
<li>
<a href="finder/" target="_blank"><img class="shake" src="img/png/fb.png" /><strong>FileBrowser</strong></a>
</li>
<li>
<a href="phpmyadmin/" target="_blank"><img class="shake" src="img/png/phpmyadmin.png" /><strong>phpMyAdmin</strong></a>
</li>
<li>
<a href="h5ai/" target="_blank"><img class="shake" src="img/png/FontExplorer-X.png" /><strong>H5ai</strong></a>
</li>
<li>
<a href="easyexplorer/" target="_blank"><img class="shake" src="img/png/easyexplorer.png" /><strong>易有云</strong></a>
</li>
<li>
<a href="wordpress/" target="_blank"><img class="shake" src="img/png/wordpress.png" /><strong>WordPress</strong></a>
</li>
<li>
<a href="nextcloud/" target="_blank"><img class="shake" src="img/png/nextcloud.png" /><strong>NextCloud</strong></a>
</li>
<li>
<a href="shell/" target="_blank"><img class="shake" src="img/png/ttyd.png" /><strong>超级终端</strong></a>
</li>
<li>
<a href="seafile/" target="_blank"><img class="shake" src="img/png/seafile.png" /><strong>文件同步</strong></a>
</li>
<li>
<a href="https://blog.windtech.cf" target="_blank"><img class="shake" src="img/png/wind.png" /><strong>乘风的博客</strong></a>
</li>
</ul>
</div>
<div style="clear: both;"></div>
</div>
</div>
</body>
</html>
server {
listen 80;
server_name localhost;
root /opt/wwwroot/navi/;
index index.html index.htm index.php /h5ai/_h5ai/public/index.php;
include /opt/etc/nginx/conf/php-fpm.conf;
#otherconf
location ^~/tz/ {
proxy_pass http://127.0.0.1:81/;
}
location ^~/omv/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_pass http://127.0.0.1:88/;
}
location ^~/qbt/ {
proxy_pass http://127.0.0.1:9080/;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $http_host;
}
location /jellyfin {
return 302 $scheme://$host/jellyfin/;
}
location /jellyfin/ {
proxy_pass http://127.0.0.1:8096/;
proxy_pass_request_headers on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
# Disable buffering when the nginx proxy gets very resource heavy upon streaming
proxy_buffering off;
}
location /bt {
return 302 $scheme://$host/bt/;
}
location /bt/ {
proxy_read_timeout 90;
proxy_pass_header X-Transmission-Session-Id;
proxy_pass http://127.0.0.1:9091;
location /bt/rpc {
proxy_pass http://127.0.0.1:9091/bt/rpc;
}
}
# FileBrowser not working as hardcoded assets path
location /finder {
return 302 $scheme://$host/finder/;
}
location /finder/ {
proxy_pass http://127.0.0.1:8088;
}
# easyexplorer not working as hardcoded assets path
location /easyexplorer {
return 302 $scheme://$host/easyexplorer/;
}
location /easyexplorer/ {
proxy_pass http://127.0.0.1:8899/;
}
# easyexplorer not working as hardcoded assets path
location /shell {
return 302 $scheme://$host/shell/;
}
location /shell/ {
proxy_pass http://127.0.0.1:4200/;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment