Massive update to make config more generic.
10
.gitignore
vendored
@ -1,6 +1,14 @@
|
||||
.data
|
||||
vhost.d
|
||||
.terraform
|
||||
.env
|
||||
.cache
|
||||
.terraform.lock.hcl
|
||||
backup/
|
||||
.nginx.conf-*
|
||||
.httpd.conf-*
|
||||
.haproxy.conf-*
|
||||
.hosts-*
|
||||
.apache24-*
|
||||
hosts
|
||||
rc.conf
|
||||
httpd.conf
|
69
README.md
Normal file
@ -0,0 +1,69 @@
|
||||
# Stashbox Webhost
|
||||
|
||||
Simple and secure application to host files directly from a filesystem.
|
||||
I recommend setting up a ZFS fileserver and backups to complete a secure,
|
||||
reliable cloud storage system.
|
||||
|
||||
Designed for IPv6 but includes an extra haproxy config to handle
|
||||
single-stream legacy IP traffic. You will likely need legacy IP
|
||||
if you are using Plex.
|
||||
|
||||
Configuration includes references to route some traffic to `app.stashbox`,
|
||||
which is defined as a docker-compose app in the companion repo `stashbox-app`.
|
||||
|
||||
## Components
|
||||
|
||||
#### Taskfile.yml
|
||||
|
||||
- Operations and deployment script library.
|
||||
|
||||
#### System Configs
|
||||
|
||||
Example FreeBSD system configs to support this service.
|
||||
|
||||
`hosts.dist`
|
||||
|
||||
`rc.conf.dist`
|
||||
|
||||
`envvars.dist`
|
||||
|
||||
#### HTTPd
|
||||
|
||||
- Serve filesystem using file index module with custom interface and Letsencrypt.
|
||||
|
||||
`httpd.conf.dist`
|
||||
|
||||
- Configuration to listen on web.stashbox https.
|
||||
- Domain names must be explicitly set here for Letsencrypt.
|
||||
|
||||
`htaccess`
|
||||
|
||||
- Custom root .htaccess based on apaxy to enhance Apache file index module.
|
||||
|
||||
`theme`
|
||||
|
||||
- Style and pages for the Apache file index based.
|
||||
|
||||
#### Nginx
|
||||
|
||||
- Forward http traffic on plex.stashbox interface to plexmediaserver backend.
|
||||
|
||||
#### HAproxy
|
||||
|
||||
- Listen on legacy IP interface and forward traffic to appropriate system.
|
||||
- Useful to handle traffic from a port-forwarded legacy route with a single external IP.
|
||||
|
||||
#### DNS Terraform
|
||||
|
||||
- DNS record management using Namecheap provider.
|
||||
|
||||
## References
|
||||
|
||||
full breakdown of the mod_autoindex module:
|
||||
- http://apache.org/docs/2.4/mod/mod_autoindex.html
|
||||
|
||||
official media types list from IANA
|
||||
- https://www.iana.org/assignments/media-types/media-types.xhtml
|
||||
|
||||
media types included in apache
|
||||
- https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
|
109
Taskfile.yaml
@ -1,20 +1,103 @@
|
||||
# https://taskfile.dev
|
||||
|
||||
---
|
||||
version: '3'
|
||||
|
||||
silent: true
|
||||
|
||||
vars:
|
||||
INDEX_ROOT: /data
|
||||
# This is hardcoded into 2 additional files.
|
||||
DOC_ROOT: /data/documents/web/stashbox
|
||||
CONFIG_PATHS: |
|
||||
/usr/local/etc/haproxy.conf
|
||||
/usr/local/etc/nginx/nginx.conf
|
||||
/usr/local/etc/apache24/httpd.conf
|
||||
SERVICES: "haproxy apache24 nginx plexmediaserver"
|
||||
SERVICE_PORTS: 80 443 22 32400
|
||||
command: 'echo $(whoami)@$(hostname -f)'
|
||||
|
||||
dotenv:
|
||||
- .env
|
||||
env:
|
||||
GITLAB_PROJECT_ID: '{{ .stashbox_project_id }}'
|
||||
GITLAB_PROJECT_SLUG: stashbox
|
||||
|
||||
tasks:
|
||||
update-doc:
|
||||
default:
|
||||
- task: services
|
||||
|
||||
run: ssh -qtt othostash.com '{{.command}}'
|
||||
run-root: ssh -qtt othostash.com 'su -l root -c "{{.command}}"'
|
||||
|
||||
exec:
|
||||
- task: run
|
||||
vars:
|
||||
command: "{{.CLI_ARGS}}"
|
||||
exec-root:
|
||||
- task: run-root
|
||||
vars:
|
||||
command: "{{.CLI_ARGS}}"
|
||||
|
||||
services-restart:
|
||||
cmds:
|
||||
- cp root_htaccess {{.INDEX_ROOT}}/.htaccess
|
||||
- cp -a index-theme {{.DOC_ROOT}}
|
||||
silent: false
|
||||
update-conf:
|
||||
- for: { var: SERVICES }
|
||||
task: run-root
|
||||
vars:
|
||||
command: echo service {{.ITEM}} restart
|
||||
services:
|
||||
cmds:
|
||||
- cp /usr/local/etc/apache24/httpd.conf ./.httpd-$(date +%s).conf.backup
|
||||
- cp httpd.conf /usr/local/etc/apache24/httpd.conf
|
||||
- /usr/local/etc/rc.d/apache24 reload
|
||||
- for: { var: SERVICE_PORTS }
|
||||
task: run
|
||||
vars:
|
||||
command: echo "=== PORT {{.ITEM}}"; sockstat -l|grep ":{{.ITEM}}"
|
||||
|
||||
nano:
|
||||
- task: run
|
||||
vars:
|
||||
command: nano {{ .CLI_ARGS }}
|
||||
nano-root:
|
||||
- task: run-root
|
||||
vars:
|
||||
command: nano {{ .CLI_ARGS }}
|
||||
|
||||
diff:
|
||||
- task: path-diff
|
||||
vars:
|
||||
remote_path: "{{.CLI_ARGS}}"
|
||||
update:
|
||||
- task: safe-update
|
||||
vars:
|
||||
remote_path: "{{.CLI_ARGS}}"
|
||||
theme-update:
|
||||
- task: path-update
|
||||
vars:
|
||||
remote_path: "{{.stashbox_webtheme_root}}/"
|
||||
local_path: "theme/*"
|
||||
conf-update:
|
||||
cmds:
|
||||
- for: { var: CONFIG_PATHS }
|
||||
task: safe-update
|
||||
vars:
|
||||
remote_path: "{{.ITEM}}"
|
||||
conf-diff:
|
||||
cmds:
|
||||
- for: { var: CONFIG_PATHS }
|
||||
task: path-diff
|
||||
vars:
|
||||
remote_path: "{{.ITEM}}"
|
||||
|
||||
plan: source .env; terraform init; terraform plan
|
||||
migrate-state: terraform init -migrate-state
|
||||
|
||||
# Utilities
|
||||
path-update: echo scp "{{.local_path}}" "$stashbox_domain:{{.remote_path}}"
|
||||
path-backup: scp "$stashbox_domain:{{.remote_path}}" "./.$(basename {{.remote_path}})-$(date +%s)" || echo "No file found."
|
||||
path-diff:
|
||||
- task: path-backup
|
||||
vars:
|
||||
remote_path: "{{.remote_path}}"
|
||||
- diff "$(ls -c .$(basename {{.remote_path}})-*|head -n1)" "$(basename {{.remote_path}})" || [ "$?" == "1" ]
|
||||
safe-update:
|
||||
- task: path-backup
|
||||
vars:
|
||||
remote_path: "{{.remote_path}}"
|
||||
- echo scp "$(basename {{.remote_path}})" "$stashbox_domain:{{.remote_path}}"
|
||||
- task: path-diff
|
||||
vars:
|
||||
remote_path: "{{.remote_path}}"
|
||||
|
@ -1 +0,0 @@
|
||||
Require all denied
|
76
dns.tf
@ -10,71 +10,71 @@ terraform {
|
||||
|
||||
provider "namecheap" {}
|
||||
|
||||
variable "subnet" {
|
||||
variable "stash_domain" {
|
||||
type = string
|
||||
default = "fd00"
|
||||
default = "web.stash"
|
||||
}
|
||||
|
||||
variable "db_addr" {
|
||||
variable "web_addr" {
|
||||
type = string
|
||||
default = "::1"
|
||||
default = "::db"
|
||||
}
|
||||
|
||||
variable "feed_addr" {
|
||||
type = string
|
||||
default = "::2"
|
||||
default = "::feed"
|
||||
}
|
||||
|
||||
variable "db_ipv4_addr" {
|
||||
variable "app_addr" {
|
||||
type = string
|
||||
default = "192.168.0.1"
|
||||
default = "::beef"
|
||||
}
|
||||
|
||||
variable "domain" {
|
||||
variable "ip4_ext" {
|
||||
type = string
|
||||
default = "library.local"
|
||||
default = "0.0.0.0"
|
||||
}
|
||||
|
||||
variable "feed_subdomain_name" {
|
||||
type = string
|
||||
default = "feed"
|
||||
}
|
||||
|
||||
variable "plex_subdomain_name" {
|
||||
type = string
|
||||
default = "plex"
|
||||
}
|
||||
|
||||
resource "namecheap_domain_records" "othostash" {
|
||||
domain = var.domain
|
||||
resource "namecheap_domain_records" "stash" {
|
||||
domain = var.stash_domain
|
||||
record {
|
||||
hostname = "@"
|
||||
address = "${var.subnet}${var.db_addr}"
|
||||
type = "AAAA"
|
||||
}
|
||||
record {
|
||||
hostname = var.feed_subdomain_name
|
||||
address = "${var.subnet}${var.feed_addr}"
|
||||
hostname = "www"
|
||||
address = var.web_addr
|
||||
type = "AAAA"
|
||||
}
|
||||
record {
|
||||
hostname = "www"
|
||||
address = var.domain
|
||||
type = "CNAME"
|
||||
address = var.ip4_ext
|
||||
type = "A"
|
||||
}
|
||||
record {
|
||||
hostname = var.plex_subdomain_name
|
||||
address = "${var.feed_subdomain_name}.${var.domain}"
|
||||
type = "CNAME"
|
||||
hostname = "feed"
|
||||
address = var.feed_addr
|
||||
type = "AAAA"
|
||||
}
|
||||
record {
|
||||
hostname = "feed"
|
||||
address = var.ip4_ext
|
||||
type = "A"
|
||||
}
|
||||
record {
|
||||
hostname = "app"
|
||||
address = var.app_addr
|
||||
type = "AAAA"
|
||||
}
|
||||
record {
|
||||
hostname = "app"
|
||||
address = var.ip4_ext
|
||||
type = "A"
|
||||
}
|
||||
record {
|
||||
hostname = "@"
|
||||
address = var.db_ipv4_addr
|
||||
type = "A"
|
||||
address = "www.${var.stash_domain}"
|
||||
type = "CNAME"
|
||||
}
|
||||
record {
|
||||
hostname = var.feed_subdomain_name
|
||||
address = var.db_ipv4_addr
|
||||
type = "A"
|
||||
hostname = "plex"
|
||||
address = "feed.${var.stash_domain}"
|
||||
type = "CNAME"
|
||||
}
|
||||
}
|
||||
|
7
hosts.dist
Normal file
@ -0,0 +1,7 @@
|
||||
# I assign interface hostnames in /etc/hosts to keep track
|
||||
# since this app goes years without maintenance.
|
||||
fe80::deed:feed resolver.stashbox
|
||||
fe80::db web.stashbox
|
||||
fe80::feed plex.stashbox scp.stashbox
|
||||
fe80::beef app.stashbox
|
||||
127.0.0.1 ip4.stashbox
|
@ -1,34 +1,3 @@
|
||||
#
|
||||
# apaxy
|
||||
# Copyright (C) 2021 @adamwhitcroft
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
# for a full breakdown of the mod_autoindex module:
|
||||
# http://apache.org/docs/2.4/mod/mod_autoindex.html
|
||||
#
|
||||
|
||||
#
|
||||
# official media types list from IANA
|
||||
# https://www.iana.org/assignments/media-types/media-types.xhtml
|
||||
#
|
||||
# media types included in apache
|
||||
# https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
|
||||
#
|
||||
|
||||
# enable indexing
|
||||
Options +Indexes
|
||||
|
||||
@ -37,10 +6,10 @@ IndexOptions +Charset=UTF-8 +FancyIndexing +FoldersFirst +HTMLTable +IconsAreLin
|
||||
|
||||
# favicon & meta viewport
|
||||
IndexHeadInsert "\
|
||||
<link rel=\"shortcut icon\" href=\"/documents/web/stashbox/index-theme/favicon.ico\" />\
|
||||
<link rel=\"shortcut icon\" href=\"/documents/web/stashbox/theme/favicon.ico\" />\
|
||||
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />"
|
||||
|
||||
#IndexIgnore .htaccess /documents/web/stashbox/index-theme/
|
||||
#IndexIgnore .htaccess /documents/web/stashbox/theme/
|
||||
|
||||
|
||||
#
|
||||
@ -48,9 +17,9 @@ IndexHeadInsert "\
|
||||
#
|
||||
|
||||
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/empty.svg ^^BLANKICON^^
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/folder.svg ^^DIRECTORY^^
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/user-home.svg ..
|
||||
AddIcon /documents/web/stashbox/theme/icons/empty.svg ^^BLANKICON^^
|
||||
AddIcon /documents/web/stashbox/theme/icons/folder.svg ^^DIRECTORY^^
|
||||
AddIcon /documents/web/stashbox/theme/icons/user-home.svg ..
|
||||
|
||||
#
|
||||
# unused icons (that should be soon removed)
|
||||
@ -65,36 +34,36 @@ AddIcon /documents/web/stashbox/index-theme/icons/user-home.svg ..
|
||||
#
|
||||
|
||||
# ext: ai eps ps
|
||||
AddIconByType (ps,/documents/web/stashbox/index-theme/icons/image-x-eps.svg) application/postscript
|
||||
AddIconByType (ps,/documents/web/stashbox/theme/icons/image-x-eps.svg) application/postscript
|
||||
|
||||
# ext: bmp
|
||||
AddIconByType (bmp,/documents/web/stashbox/index-theme/icons/image-bmp.svg) image/bmp
|
||||
AddIconByType (bmp,/documents/web/stashbox/theme/icons/image-bmp.svg) image/bmp
|
||||
|
||||
# ext: gif
|
||||
AddIconByType (gif,/documents/web/stashbox/index-theme/icons/image-gif.svg) image/gif
|
||||
AddIconByType (gif,/documents/web/stashbox/theme/icons/image-gif.svg) image/gif
|
||||
|
||||
# ext: ico
|
||||
AddIconByType (ico,/documents/web/stashbox/index-theme/icons/image-x-ico.svg) image/x-icon
|
||||
AddIconByType (ico,/documents/web/stashbox/theme/icons/image-x-ico.svg) image/x-icon
|
||||
|
||||
# ext: jpg jpeg jpe
|
||||
AddIconByType (jpg,/documents/web/stashbox/index-theme/icons/image-jpeg.svg) image/jpeg
|
||||
AddIconByType (jpg,/documents/web/stashbox/theme/icons/image-jpeg.svg) image/jpeg
|
||||
|
||||
# ext: png
|
||||
AddIconByType (png,/documents/web/stashbox/index-theme/icons/image-png.svg) image/png
|
||||
AddIconByType (png,/documents/web/stashbox/theme/icons/image-png.svg) image/png
|
||||
|
||||
# ext: psd
|
||||
AddIconByType (psd,/documents/web/stashbox/index-theme/icons/image-x-psd.svg) image/vnd.adobe.photoshop
|
||||
AddIconByType (psd,/documents/web/stashbox/theme/icons/image-x-psd.svg) image/vnd.adobe.photoshop
|
||||
|
||||
# ext: svg svgz
|
||||
AddIconByType (draw,/documents/web/stashbox/index-theme/icons/x-office-drawing.svg) image/svg+xml
|
||||
AddIconByType (draw,/documents/web/stashbox/theme/icons/x-office-drawing.svg) image/svg+xml
|
||||
|
||||
# ext: tiff tif
|
||||
AddIconByType (tiff,/documents/web/stashbox/index-theme/icons/image-tiff.svg) image/tiff
|
||||
AddIconByType (tiff,/documents/web/stashbox/theme/icons/image-tiff.svg) image/tiff
|
||||
|
||||
# xcf media type not yet included in apache, fallback to AddIcon
|
||||
# ext: xcf
|
||||
#AddIconByType (xcf,/documents/web/stashbox/index-theme/icons/image-x-xcf.svg) image/x-xcf
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/image-x-xcf.svg .xcf
|
||||
#AddIconByType (xcf,/documents/web/stashbox/theme/icons/image-x-xcf.svg) image/x-xcf
|
||||
AddIcon /documents/web/stashbox/theme/icons/image-x-xcf.svg .xcf
|
||||
|
||||
# all other images
|
||||
# ext: bmp cgm g3 gif ief jpeg jpg jpe ktx png btif sgi svg svgz tiff tif psd uvi uvvi uvg uvvg djvu djv sub dwg dxf fbs fpx fst mmr rlc mdi wdp npx wbmp xif webp 3ds ras cmx fh fhc fh4 fh5 fh7 ico sid pcx pic pct pnm pbm pgm ppm rgb tga xbm xpm xwd
|
||||
@ -102,7 +71,7 @@ AddIcon /documents/web/stashbox/index-theme/icons/image-x-xcf.svg .xcf
|
||||
# ext: otg
|
||||
# ext: odi
|
||||
# ext: oti
|
||||
AddIconByType (image,/documents/web/stashbox/index-theme/icons/image-x-generic.svg) image/* \
|
||||
AddIconByType (image,/documents/web/stashbox/theme/icons/image-x-generic.svg) image/* \
|
||||
application/vnd.oasis.opendocument.graphics \
|
||||
application/vnd.oasis.opendocument.graphics-template \
|
||||
application/vnd.oasis.opendocument.image \
|
||||
@ -117,13 +86,13 @@ AddIconByType (image,/documents/web/stashbox/index-theme/icons/image-x-generic.s
|
||||
# ext: m3u
|
||||
# ext: m3u8
|
||||
# ext: pls
|
||||
AddIconByType (playlist,/documents/web/stashbox/index-theme/icons/audio-x-mp3-playlist.svg) audio/x-mpegurl \
|
||||
AddIconByType (playlist,/documents/web/stashbox/theme/icons/audio-x-mp3-playlist.svg) audio/x-mpegurl \
|
||||
application/vnd.apple.mpegurl \
|
||||
application/pls+xml
|
||||
|
||||
# all audio
|
||||
# ext: adp au snd mid midi kar rmi m4a mp4a mpga mp2 mp2a mp3 m2a m3a oga ogg spx s3m sil uva uvva eol dra dts dtshd lvp pya ecelp4800 ecelp7470 ecelp9600 rip weba aac aif aiff aifc caf flac mka m3u wax wma xm rmp ram ra wav
|
||||
AddIconByType (audio,/documents/web/stashbox/index-theme/icons/audio-x-generic.svg) audio/*
|
||||
AddIconByType (audio,/documents/web/stashbox/theme/icons/audio-x-generic.svg) audio/*
|
||||
|
||||
|
||||
#
|
||||
@ -132,11 +101,11 @@ AddIconByType (audio,/documents/web/stashbox/index-theme/icons/audio-x-generic.s
|
||||
|
||||
# video playlist
|
||||
# ext: mxu m4u
|
||||
AddIconByType (playlist,/documents/web/stashbox/index-theme/icons/video-x-generic.svg) video/vnd.mpegurl
|
||||
AddIconByType (playlist,/documents/web/stashbox/theme/icons/video-x-generic.svg) video/vnd.mpegurl
|
||||
|
||||
# all video
|
||||
# ext: 3g2 3gp h261 h263 h264 jpgv jpm jpgm mj2 mjp2 mp4 mp4v mpg4 mpeg mpg mpe m1v m2v ogv qt mov uvh uvvh uvm uvvm uvp uvvp uvs uvvs uvv uvvv dvb fvt mxu m4u pyv uvu uvvu viv webm f4v fli flv m4v mkv mk3d mks mng asf asx avi vob wmv wm wmx wvx movie smv
|
||||
AddIconByType (video,/documents/web/stashbox/index-theme/icons/video-x-generic.svg) video/*
|
||||
AddIconByType (video,/documents/web/stashbox/theme/icons/video-x-generic.svg) video/*
|
||||
|
||||
|
||||
#
|
||||
@ -146,27 +115,27 @@ AddIconByType (video,/documents/web/stashbox/index-theme/icons/video-x-generic.s
|
||||
# ext: html htm
|
||||
# ext: xhtml xht
|
||||
# ext: uri uris urls
|
||||
AddIconByType (html,/documents/web/stashbox/index-theme/icons/text-html.svg) text/html \
|
||||
AddIconByType (html,/documents/web/stashbox/theme/icons/text-html.svg) text/html \
|
||||
application/xhtml+xml \
|
||||
text/uri-list
|
||||
|
||||
# ext: rss
|
||||
# ext: atom
|
||||
AddIconByType (rss,/documents/web/stashbox/index-theme/icons/application-rss+xml.svg) application/rss+xml \
|
||||
AddIconByType (rss,/documents/web/stashbox/theme/icons/application-rss+xml.svg) application/rss+xml \
|
||||
application/atom+xml
|
||||
|
||||
# ext: ics ifb
|
||||
# ext: vcs
|
||||
AddIconByType (vcal,/documents/web/stashbox/index-theme/icons/evolution-calendar.svg) text/calendar \
|
||||
AddIconByType (vcal,/documents/web/stashbox/theme/icons/evolution-calendar.svg) text/calendar \
|
||||
text/x-vcalendar
|
||||
|
||||
# ext: vcard
|
||||
# ext: vcf
|
||||
AddIconByType (vcard,/documents/web/stashbox/index-theme/icons/addressbook.svg) text/vcard \
|
||||
AddIconByType (vcard,/documents/web/stashbox/theme/icons/addressbook.svg) text/vcard \
|
||||
text/x-vcard
|
||||
|
||||
# ext: torrent
|
||||
AddIconByType (torrent,/documents/web/stashbox/index-theme/icons/application-x-bittorrent.svg) application/x-bittorrent
|
||||
AddIconByType (torrent,/documents/web/stashbox/theme/icons/application-x-bittorrent.svg) application/x-bittorrent
|
||||
|
||||
|
||||
#
|
||||
@ -182,7 +151,7 @@ AddIconByType (torrent,/documents/web/stashbox/index-theme/icons/application-x-b
|
||||
# ext: csv
|
||||
# ext: xls xlm xla xlc xlt xlw
|
||||
# ext: xlsx
|
||||
AddIconByType (calc,/documents/web/stashbox/index-theme/icons/x-office-spreadsheet.svg) application/vnd.oasis.opendocument.chart \
|
||||
AddIconByType (calc,/documents/web/stashbox/theme/icons/x-office-spreadsheet.svg) application/vnd.oasis.opendocument.chart \
|
||||
application/vnd.oasis.opendocument.chart-template \
|
||||
application/vnd.oasis.opendocument.formula \
|
||||
application/vnd.oasis.opendocument.formula-template \
|
||||
@ -198,7 +167,7 @@ AddIconByType (calc,/documents/web/stashbox/index-theme/icons/x-office-spreadshe
|
||||
# ext: oth
|
||||
# ext: doc dot
|
||||
# ext: docx
|
||||
AddIconByType (doc,/documents/web/stashbox/index-theme/icons/x-office-document.svg) application/vnd.oasis.opendocument.text \
|
||||
AddIconByType (doc,/documents/web/stashbox/theme/icons/x-office-document.svg) application/vnd.oasis.opendocument.text \
|
||||
application/vnd.oasis.opendocument.text-master \
|
||||
application/vnd.oasis.opendocument.text-template \
|
||||
application/vnd.oasis.opendocument.text-web \
|
||||
@ -210,7 +179,7 @@ AddIconByType (doc,/documents/web/stashbox/index-theme/icons/x-office-document.s
|
||||
# ext: ppt pps pot
|
||||
# ext: pptx
|
||||
# ext: ppsx
|
||||
AddIconByType (slideshow,/documents/web/stashbox/index-theme/icons/x-office-presentation.svg) application/vnd.oasis.opendocument.presentation \
|
||||
AddIconByType (slideshow,/documents/web/stashbox/theme/icons/x-office-presentation.svg) application/vnd.oasis.opendocument.presentation \
|
||||
application/vnd.oasis.opendocument.presentation-template \
|
||||
application/vnd.ms-powerpoint \
|
||||
application/vnd.openxmlformats-officedocument.presentationml.presentation \
|
||||
@ -218,18 +187,18 @@ AddIconByType (slideshow,/documents/web/stashbox/index-theme/icons/x-office-pres
|
||||
|
||||
# ext: mdb
|
||||
# ext: odb
|
||||
AddIconByType (database,/documents/web/stashbox/index-theme/icons/text-x-sql.svg) application/x-msaccess \
|
||||
AddIconByType (database,/documents/web/stashbox/theme/icons/text-x-sql.svg) application/x-msaccess \
|
||||
application/vnd.oasis.opendocument.database
|
||||
|
||||
# ext: pdf
|
||||
AddIconByType (pdf,/documents/web/stashbox/index-theme/icons/application-pdf.svg) application/pdf
|
||||
AddIconByType (pdf,/documents/web/stashbox/theme/icons/application-pdf.svg) application/pdf
|
||||
|
||||
# ext: rtf
|
||||
AddIconByType (rtf,/documents/web/stashbox/index-theme/icons/text-richtext.svg) application/rtf
|
||||
AddIconByType (rtf,/documents/web/stashbox/theme/icons/text-richtext.svg) application/rtf
|
||||
|
||||
# ext: latex
|
||||
# ext: tex
|
||||
AddIconByType (tex,/documents/web/stashbox/index-theme/icons/text-x-tex.svg) application/x-latex \
|
||||
AddIconByType (tex,/documents/web/stashbox/theme/icons/text-x-tex.svg) application/x-latex \
|
||||
application/x-tex
|
||||
|
||||
|
||||
@ -239,65 +208,65 @@ AddIconByType (tex,/documents/web/stashbox/index-theme/icons/text-x-tex.svg) app
|
||||
|
||||
# h media type not yet included in apache, fallback to AddIcon
|
||||
# ext: h
|
||||
#AddIconByType (h,/documents/web/stashbox/index-theme/icons/text-x-chdr.svg) text/x-h
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/text-x-chdr.svg .h
|
||||
#AddIconByType (h,/documents/web/stashbox/theme/icons/text-x-chdr.svg) text/x-h
|
||||
AddIcon /documents/web/stashbox/theme/icons/text-x-chdr.svg .h
|
||||
|
||||
# hpp files do not have a specific media type, fallback to AddIcon
|
||||
# ext: hpp
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/text-x-c++hdr.svg .hpp
|
||||
AddIcon /documents/web/stashbox/theme/icons/text-x-c++hdr.svg .hpp
|
||||
|
||||
# cpp files do not have a specific media type, fallback to AddIcon
|
||||
# ext: cpp
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/text-x-c++.svg .cpp
|
||||
AddIcon /documents/web/stashbox/theme/icons/text-x-c++.svg .cpp
|
||||
|
||||
# ext: c cc cxx cpp h hh dic
|
||||
AddIconByType (c,/documents/web/stashbox/index-theme/icons/text-x-c.svg) text/x-c
|
||||
AddIconByType (c,/documents/web/stashbox/theme/icons/text-x-c.svg) text/x-c
|
||||
|
||||
# ext: java
|
||||
# ext: jar
|
||||
# ext: class
|
||||
AddIconByType (java,/documents/web/stashbox/index-theme/icons/text-x-java.svg) text/x-java-source \
|
||||
AddIconByType (java,/documents/web/stashbox/theme/icons/text-x-java.svg) text/x-java-source \
|
||||
application/java-archive \
|
||||
application/java-vm
|
||||
|
||||
# sass and scss files do not have a specific media type, fallback to AddIcon
|
||||
# ext: sass scss
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/text-css.svg .sass .scss
|
||||
AddIcon /documents/web/stashbox/theme/icons/text-css.svg .sass .scss
|
||||
|
||||
# ext: css
|
||||
AddIconByType (css,/documents/web/stashbox/index-theme/icons/text-css.svg) text/css
|
||||
AddIconByType (css,/documents/web/stashbox/theme/icons/text-css.svg) text/css
|
||||
|
||||
# ext: js
|
||||
# ext: json
|
||||
AddIconByType (js,/documents/web/stashbox/index-theme/icons/text-x-javascript.svg) application/javascript \
|
||||
AddIconByType (js,/documents/web/stashbox/theme/icons/text-x-javascript.svg) application/javascript \
|
||||
application/json
|
||||
|
||||
# diff and patch files do not have a specific media type, fallback to AddIcon
|
||||
# ext: diff patch
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/text-x-source.svg .diff .patch
|
||||
AddIcon /documents/web/stashbox/theme/icons/text-x-source.svg .diff .patch
|
||||
|
||||
# makefile files do not have a specific media type, fallback to AddIcon
|
||||
# ext: Makefile
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/text-x-makefile.svg Makefile
|
||||
AddIcon /documents/web/stashbox/theme/icons/text-x-makefile.svg Makefile
|
||||
|
||||
# php files do not have a specific media type, fallback to AddIcon
|
||||
# ext: php phtml
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/application-x-php.svg .php .phtml
|
||||
AddIcon /documents/web/stashbox/theme/icons/application-x-php.svg .php .phtml
|
||||
|
||||
# python files do not have a specific media type, fallback to AddIcon
|
||||
# ext: py
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/text-x-python.svg .py
|
||||
AddIcon /documents/web/stashbox/theme/icons/text-x-python.svg .py
|
||||
|
||||
# ruby files do not have a specific media type, fallback to AddIcon
|
||||
# ext: rb
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/application-x-ruby.svg .rb
|
||||
AddIcon /documents/web/stashbox/theme/icons/application-x-ruby.svg .rb
|
||||
|
||||
# ext: sql
|
||||
AddIconByType (sql,/documents/web/stashbox/index-theme/icons/text-x-sql.svg) application/x-sql
|
||||
AddIconByType (sql,/documents/web/stashbox/theme/icons/text-x-sql.svg) application/x-sql
|
||||
|
||||
# ext: xml xsl
|
||||
# ext: dtd
|
||||
AddIconByType (xml,/documents/web/stashbox/index-theme/icons/text-xml.svg) application/xml \
|
||||
AddIconByType (xml,/documents/web/stashbox/theme/icons/text-xml.svg) application/xml \
|
||||
application/xml-dtd
|
||||
|
||||
|
||||
@ -307,63 +276,63 @@ AddIconByType (xml,/documents/web/stashbox/index-theme/icons/text-xml.svg) appli
|
||||
|
||||
# pkg files do not have a specific media type, fallback to AddIcon
|
||||
# ext: pkg
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/package-x-generic.svg .pkg
|
||||
AddIcon /documents/web/stashbox/theme/icons/package-x-generic.svg .pkg
|
||||
|
||||
# ext: bin dms lrf mar so dist distz pkg bpk dump elc deploy
|
||||
AddIconByType (bin,/documents/web/stashbox/index-theme/icons/multipart-encrypted.svg) application/octet-stream
|
||||
AddIconByType (bin,/documents/web/stashbox/theme/icons/multipart-encrypted.svg) application/octet-stream
|
||||
|
||||
# ext: iso
|
||||
AddIconByType (cd,/documents/web/stashbox/index-theme/icons/application-x-cd-image.svg) application/x-iso9660-image
|
||||
AddIconByType (cd,/documents/web/stashbox/theme/icons/application-x-cd-image.svg) application/x-iso9660-image
|
||||
|
||||
# ext: deb udeb
|
||||
AddIconByType (deb,/documents/web/stashbox/index-theme/icons/deb.svg) application/x-debian-package
|
||||
AddIconByType (deb,/documents/web/stashbox/theme/icons/deb.svg) application/x-debian-package
|
||||
|
||||
# msi files do not have a specific media type, fallback to AddIcon
|
||||
# ext: msi
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/text-x-install.svg .msi
|
||||
AddIcon /documents/web/stashbox/theme/icons/text-x-install.svg .msi
|
||||
|
||||
# ext: exe dll com bat msi
|
||||
AddIconByType (exe,/documents/web/stashbox/index-theme/icons/application-x-ms-dos-executable.svg) application/x-msdownload
|
||||
AddIconByType (exe,/documents/web/stashbox/theme/icons/application-x-ms-dos-executable.svg) application/x-msdownload
|
||||
|
||||
# ext: dmg
|
||||
# ext: mpkg
|
||||
# ext: apk
|
||||
AddIconByType (package,/documents/web/stashbox/index-theme/icons/package-x-generic.svg) application/x-apple-diskimage \
|
||||
AddIconByType (package,/documents/web/stashbox/theme/icons/package-x-generic.svg) application/x-apple-diskimage \
|
||||
application/vnd.apple.installer+xml \
|
||||
application/vnd.android.package-archive
|
||||
|
||||
# rpm files do not have a specific media type, fallback to AddIcon
|
||||
# ext: rpm
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/rpm.svg .rpm
|
||||
AddIcon /documents/web/stashbox/theme/icons/rpm.svg .rpm
|
||||
|
||||
# ext: sh
|
||||
AddIconByType (script,/documents/web/stashbox/index-theme/icons/text-x-script.svg) application/x-sh
|
||||
AddIconByType (script,/documents/web/stashbox/theme/icons/text-x-script.svg) application/x-sh
|
||||
|
||||
# ext: ttc otf ttf woff2 woff
|
||||
AddIconByType (font,/documents/web/stashbox/index-theme/icons/font-x-generic.svg) font/*
|
||||
AddIconByType (font,/documents/web/stashbox/theme/icons/font-x-generic.svg) font/*
|
||||
|
||||
#
|
||||
# archives
|
||||
#
|
||||
|
||||
# ext: gz
|
||||
AddIconByType (gzip,/documents/web/stashbox/index-theme/icons/application-x-archive.svg) application/x-gzip
|
||||
AddIconByType (gzip,/documents/web/stashbox/theme/icons/application-x-archive.svg) application/x-gzip
|
||||
|
||||
# gzip media type does not include .gzip file extension, fallback to AddIcon
|
||||
# ext: gzip
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/application-x-archive.svg .gzip
|
||||
AddIcon /documents/web/stashbox/theme/icons/application-x-archive.svg .gzip
|
||||
|
||||
# ext: rar
|
||||
AddIconByType (rar,/documents/web/stashbox/index-theme/icons/application-x-rar.svg) application/x-rar-compressed
|
||||
AddIconByType (rar,/documents/web/stashbox/theme/icons/application-x-rar.svg) application/x-rar-compressed
|
||||
|
||||
# ext: tar
|
||||
AddIconByType (tar,/documents/web/stashbox/index-theme/icons/application-x-tar.svg) application/x-tar
|
||||
AddIconByType (tar,/documents/web/stashbox/theme/icons/application-x-tar.svg) application/x-tar
|
||||
|
||||
# ext: zip
|
||||
AddIconByType (zip,/documents/web/stashbox/index-theme/icons/application-x-zip.svg) application/zip
|
||||
AddIconByType (zip,/documents/web/stashbox/theme/icons/application-x-zip.svg) application/zip
|
||||
|
||||
# ext: 7z bz bz2 cab
|
||||
AddIconByType (archive,/documents/web/stashbox/index-theme/icons/application-x-archive.svg) application/x-7z-compressed \
|
||||
AddIconByType (archive,/documents/web/stashbox/theme/icons/application-x-archive.svg) application/x-7z-compressed \
|
||||
application/x-bzip \
|
||||
application/x-bzip2 \
|
||||
application/vnd.ms-cab-compressed
|
||||
@ -374,12 +343,12 @@ AddIconByType (archive,/documents/web/stashbox/index-theme/icons/application-x-a
|
||||
#
|
||||
|
||||
# ext: cbr cba cbt cbz cb7
|
||||
AddIconByType (text,/documents/web/stashbox/index-theme/icons/image-x-generic.svg) application/x-cbr
|
||||
AddIconByType (text,/documents/web/stashbox/theme/icons/image-x-generic.svg) application/x-cbr
|
||||
|
||||
# ext: epub
|
||||
# ext: prc mobi
|
||||
# ext: azw
|
||||
AddIconByType (text,/documents/web/stashbox/index-theme/icons/text-plain.svg) application/epub+zip \
|
||||
AddIconByType (text,/documents/web/stashbox/theme/icons/text-plain.svg) application/epub+zip \
|
||||
application/x-mobipocket-ebook \
|
||||
application/vnd.amazon.ebook
|
||||
|
||||
@ -390,41 +359,41 @@ AddIconByType (text,/documents/web/stashbox/index-theme/icons/text-plain.svg) ap
|
||||
|
||||
# readme files do not have a specific media type, fallback to AddIcon
|
||||
# ext: README
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/text-x-readme.svg README
|
||||
AddIcon /documents/web/stashbox/theme/icons/text-x-readme.svg README
|
||||
|
||||
# markdown media type not yet included in apache, fallback to AddIcon
|
||||
# ext: markdown md
|
||||
#AddIconByType (markdown,/documents/web/stashbox/index-theme/icons/text-richtext.svg) text/mardown
|
||||
AddIcon /documents/web/stashbox/index-theme/icons/text-richtext.svg .markdown .md
|
||||
#AddIconByType (markdown,/documents/web/stashbox/theme/icons/text-richtext.svg) text/mardown
|
||||
AddIcon /documents/web/stashbox/theme/icons/text-richtext.svg .markdown .md
|
||||
|
||||
# this directive has to be at the end of the file because the text/* media type is very generic and should not be interpreted before other more specific directives
|
||||
# ext: appcache ics ifb css csv html htm n3 txt text conf def list log in dsc rtx sgml sgm tsv t tr roff man me ms ttl uri uris urls vcard curl dcurl mcurl scurl sub fly flx gv 3dml spot jad wmls wml s asm c cc cxx cpp h hh dic f for f77 f90 java nfo opml p pas etx sfv uu vcs vcf
|
||||
AddIconByType (text,/documents/web/stashbox/index-theme/icons/text-plain.svg) text/*
|
||||
AddIconByType (text,/documents/web/stashbox/theme/icons/text-plain.svg) text/*
|
||||
|
||||
|
||||
#
|
||||
# default
|
||||
#
|
||||
|
||||
DefaultIcon /documents/web/stashbox/index-theme/icons/empty.svg
|
||||
DefaultIcon /documents/web/stashbox/theme/icons/empty.svg
|
||||
|
||||
|
||||
#
|
||||
# theme files
|
||||
#
|
||||
|
||||
HeaderName /documents/web/stashbox/index-theme/header.html
|
||||
ReadmeName /documents/web/stashbox/index-theme/footer.html
|
||||
IndexStyleSheet /documents/web/stashbox/index-theme/style.css
|
||||
HeaderName /documents/web/stashbox/theme/header.html
|
||||
ReadmeName /documents/web/stashbox/theme/footer.html
|
||||
IndexStyleSheet /documents/web/stashbox/theme/style.css
|
||||
|
||||
|
||||
#
|
||||
# error pages
|
||||
#
|
||||
|
||||
ErrorDocument 400 /documents/web/stashbox/index-theme/400.html
|
||||
ErrorDocument 403 /documents/web/stashbox/index-theme/403.html
|
||||
ErrorDocument 404 /documents/web/stashbox/index-theme/404.html
|
||||
ErrorDocument 408 /documents/web/stashbox/index-theme/408.html
|
||||
ErrorDocument 500 /documents/web/stashbox/index-theme/500.html
|
||||
ErrorDocument 502 /documents/web/stashbox/index-theme/502.html
|
||||
ErrorDocument 400 /documents/web/stashbox/theme/400.html
|
||||
ErrorDocument 403 /documents/web/stashbox/theme/403.html
|
||||
ErrorDocument 404 /documents/web/stashbox/theme/404.html
|
||||
ErrorDocument 408 /documents/web/stashbox/theme/408.html
|
||||
ErrorDocument 500 /documents/web/stashbox/theme/500.html
|
||||
ErrorDocument 502 /documents/web/stashbox/theme/502.html
|
@ -1,9 +1,8 @@
|
||||
ServerName ${domain}
|
||||
ServerRoot /usr/local
|
||||
ServerName stashbox
|
||||
|
||||
Listen [${subnet}${db_addr}]:80
|
||||
Listen [${subnet}${db_addr}]:443
|
||||
Listen ${db_ipv4_int_addr}:443
|
||||
Listen web.stashbox:80
|
||||
Listen web.stashbox:443
|
||||
|
||||
LoadModule mpm_prefork_module libexec/apache24/mod_mpm_prefork.so
|
||||
LoadModule authn_file_module libexec/apache24/mod_authn_file.so
|
||||
@ -29,47 +28,32 @@ LoadModule status_module libexec/apache24/mod_status.so
|
||||
LoadModule autoindex_module libexec/apache24/mod_autoindex.so
|
||||
LoadModule watchdog_module libexec/apache24/mod_watchdog.so
|
||||
LoadModule md_module libexec/apache24/mod_md.so
|
||||
|
||||
<IfModule !mpm_prefork_module>
|
||||
#LoadModule cgid_module libexec/apache24/mod_cgid.so
|
||||
</IfModule>
|
||||
<IfModule mpm_prefork_module>
|
||||
#LoadModule cgi_module libexec/apache24/mod_cgi.so
|
||||
</IfModule>
|
||||
LoadModule dir_module libexec/apache24/mod_dir.so
|
||||
LoadModule alias_module libexec/apache24/mod_alias.so
|
||||
|
||||
IncludeOptional etc/apache24/modules.d/[0-9][0-9][0-9]_*.conf
|
||||
|
||||
<IfModule unixd_module>
|
||||
User www
|
||||
Group www
|
||||
</IfModule>
|
||||
|
||||
SSLRandomSeed startup builtin
|
||||
SSLRandomSeed connect builtin
|
||||
|
||||
MDCertificateAgreement accepted
|
||||
MDContactEmail admin@stashbox
|
||||
MDomain stashbox www.stashbox
|
||||
|
||||
<Directory />
|
||||
AllowOverride none
|
||||
Require all denied
|
||||
</Directory>
|
||||
|
||||
MDCertificateAgreement accepted
|
||||
MDContactEmail admin@${domain}
|
||||
MDomain ${domain} www.${domain}
|
||||
|
||||
# <VirtualHost [${subnet}${feed_addr}]:443>
|
||||
# ServerName "plex.${domain}"
|
||||
# SSLEngine on
|
||||
# ProxyPass "/" "http://localhost:32400"
|
||||
# ProxyPassReverse "/" "http://localhost:32400"
|
||||
# </VirtualHost>
|
||||
|
||||
<VirtualHost [${subnet}${db_addr}]:443 ${db_ipv4_int_addr}:443>
|
||||
ServerName "www.${domain}"
|
||||
ServerName "${domain}"
|
||||
|
||||
<VirtualHost web.stashbox:443>
|
||||
Servername stashbox
|
||||
ServerAlias www.stashbox
|
||||
<Location "/md-status">
|
||||
SetHandler md-status
|
||||
</Location>
|
||||
|
||||
DocumentRoot "/data"
|
||||
<Directory "/data">
|
||||
Options Indexes
|
||||
@ -79,63 +63,26 @@ MDomain ${domain} www.${domain}
|
||||
AuthUserFile /usr/local/etc/apache24/.badpass
|
||||
Require valid-user
|
||||
</Directory>
|
||||
|
||||
<DirectoryMatch "^.*/\..*">
|
||||
Require all denied
|
||||
</DirectoryMatch>
|
||||
|
||||
<Files ".*">
|
||||
Require all denied
|
||||
</Files>
|
||||
|
||||
<IfModule dir_module>
|
||||
DirectoryIndex index.html
|
||||
</IfModule>
|
||||
|
||||
SSLEngine on
|
||||
# SSLCertificateFile /usr/local/etc/apache24/fullchain.pem
|
||||
# SSLCertificateKeyFile /usr/local/etc/apache24/privkey.pem
|
||||
|
||||
ErrorLog "/var/log/httpd-error.log"
|
||||
LogLevel warn
|
||||
|
||||
<IfModule log_config_module>
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
|
||||
<IfModule logio_module>
|
||||
# You need to enable mod_logio.c to use %I and %O
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
||||
</IfModule>
|
||||
|
||||
CustomLog "/var/log/httpd-access.log" common
|
||||
</IfModule>
|
||||
|
||||
<IfModule alias_module>
|
||||
ScriptAlias /cgi-bin/ "/data/metadata/www/cgi-bin/"
|
||||
</IfModule>
|
||||
|
||||
<Directory "/data/metadata/www/cgi-bin">
|
||||
AllowOverride None
|
||||
Options None
|
||||
<Directory "/data/.theme">
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
<IfModule headers_module>
|
||||
RequestHeader unset Proxy early
|
||||
</IfModule>
|
||||
|
||||
<IfModule mime_module>
|
||||
TypesConfig etc/apache24/mime.types
|
||||
AddType application/x-compress .Z
|
||||
AddType application/x-gzip .gz .tgz
|
||||
</IfModule>
|
||||
|
||||
DirectoryIndex index.html
|
||||
SSLEngine on
|
||||
ErrorLog "/var/log/httpd-error.log"
|
||||
LogLevel warn
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||
CustomLog "/var/log/httpd-access.log" common
|
||||
RequestHeader unset Proxy early
|
||||
TypesConfig etc/apache24/mime.types
|
||||
AddType application/x-compress .Z
|
||||
AddType application/x-gzip .gz .tgz
|
||||
</VirtualHost>
|
||||
|
||||
<IfModule ssl_module>
|
||||
SSLRandomSeed startup builtin
|
||||
SSLRandomSeed connect builtin
|
||||
</IfModule>
|
||||
|
||||
Include etc/apache24/Includes/*.conf
|
40
nginx.conf
Normal file
@ -0,0 +1,40 @@
|
||||
worker_processes auto;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
upstream plexmediaserver {
|
||||
server localhost:32400;
|
||||
keepalive 32;
|
||||
}
|
||||
|
||||
server {
|
||||
listen plex.stashbox:80;
|
||||
resolver resolver.stashbox;
|
||||
server_name plex.*;
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1000;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css text/xml application/xml text/javascript application/x-javascript image/svg+xml;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Referer localhost;
|
||||
proxy_set_header Origin $scheme://localhost:$server_port;
|
||||
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 Sec-WebSocket-Extensions $http_sec_websocket_extensions;
|
||||
proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
|
||||
proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
location / { proxy_pass http://plexmediaserver; }
|
||||
}
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
|
||||
#user nobody;
|
||||
worker_processes auto;
|
||||
|
||||
# This default error log path is compiled-in to make sure configuration parsing
|
||||
# errors are logged somewhere, especially during unattended boot when stderr
|
||||
# isn't normally logged anywhere. This path will be touched on every nginx
|
||||
# start regardless of error log location configured here. See
|
||||
# https://trac.nginx.org/nginx/ticket/147 for more info.
|
||||
#
|
||||
#error_log /var/log/nginx/error.log;
|
||||
#
|
||||
|
||||
#pid logs/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
|
||||
upstream plex_backend {
|
||||
# server [::1]:32400; # replace 'plex' with the name you gave to your plex container if necessary!
|
||||
server 127.0.0.1:32400; # replace 'plex' with the name you gave to your plex container if necessary!
|
||||
keepalive 32;
|
||||
}
|
||||
|
||||
server {
|
||||
listen [2603:3015:1003:56cd::dad:feed]:80;
|
||||
listen 10.1.9.10:80;
|
||||
resolver [2603:3015:1003:5661::cede];
|
||||
server_name plex.othostash.com;
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1000;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css text/xml application/xml text/javascript application/x-javascript image/svg+xml;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
|
||||
# Forward real ip and host to Plex
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Referer localhost;
|
||||
proxy_set_header Origin $scheme://localhost:$server_port;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
#When using ngx_http_realip_module change $proxy_add_x_forwarded_for to '$http_x_forwarded_for,$realip_remote_addr'
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
|
||||
proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
|
||||
proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
|
||||
# Websockets
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
|
||||
# Buffering off send to the client as soon as the data is received from Plex.
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
|
||||
location / {
|
||||
proxy_pass http://plex_backend;
|
||||
}
|
||||
}
|
||||
}
|
25
sshd_config
Normal file
@ -0,0 +1,25 @@
|
||||
# This needs to be separated into two sshd servers.
|
||||
|
||||
Port 22
|
||||
Port 22010
|
||||
AddressFamily any
|
||||
ListenAddress localhost:22
|
||||
ListenAddress web.stashbox:22
|
||||
ListenAddress rsync.stashbox:22010
|
||||
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
Subsystem sftp internal-sftp
|
||||
|
||||
Match Group backup
|
||||
ChrootDirectory /backup/tenants/%u
|
||||
ForceCommand internal-sftp
|
||||
AllowTCPForwarding no
|
||||
AllowAgentForwarding no
|
||||
X11Forwarding no
|
||||
|
||||
Match Group collections
|
||||
ChrootDirectory /data/collections/%u
|
||||
ForceCommand internal-sftp
|
||||
AllowTCPForwarding no
|
||||
AllowAgentForwarding no
|
||||
X11Forwarding no
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@ -7,6 +7,6 @@
|
||||
<div class="footer">
|
||||
<!-- Apaxy by <a href="https://twitter.com/adamwhitcroft">@adamwhitcroft</a> -->
|
||||
</div><!--/.footer-->
|
||||
<script src=/documents/web/stashbox/index-theme/apaxy.js></script>
|
||||
<script src=/documents/web/stashbox/index/apaxy.js></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/lightgallery@2.4.0/lightgallery.min.js" integrity="sha256-rJzhAjlCghJKSkx4mAv3VwVgxDSAbNM0AH7PhP4cDns=" crossorigin="anonymous"></script>
|
||||
<script src=/documents/web/stashbox/index-theme/gallery.js></script>
|
||||
<script src=/documents/web/stashbox/index/gallery.js></script>
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |