mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 02:48:38 -04:00
* A new zim module has been added, this module allows several things to interact with Zim files. * Allow searching of Zim files using libzim. * Allow downloading of Kiwix projects (wikipedia, wikibooks, etc) on a schedule which replaces the outdated files. * Creation of a new zim docker container which allows viewing of the Zim file contents. * This commit also adds move/rename/mkdir features in the File Browser. * File tags are preserved when moving/renaming.
113 lines
2.2 KiB
Nginx Configuration File
113 lines
2.2 KiB
Nginx Configuration File
user www-data;
|
|
|
|
events {
|
|
|
|
}
|
|
|
|
http {
|
|
client_max_body_size 0;
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
charset utf-8;
|
|
|
|
include mime.types;
|
|
types {
|
|
# Custom types for ebooks.
|
|
application/x-mobipocket-ebook mobi;
|
|
application/epub+zip epub;
|
|
}
|
|
|
|
error_page 502 /error/50x.html;
|
|
error_page 503 /error/50x.html;
|
|
error_page 504 /error/50x.html;
|
|
|
|
server {
|
|
proxy_pass_header Host;
|
|
|
|
location ^~ /error/ {
|
|
internal;
|
|
alias /var/www/;
|
|
}
|
|
|
|
location /favicon.ico {
|
|
alias /opt/wrolpi/icon.ico;
|
|
}
|
|
|
|
location /apple-touch-icon.png {
|
|
alias /opt/wrolpi/icon.png;
|
|
}
|
|
|
|
location /epub/epub.html {
|
|
alias /opt/wrolpi/app/public/epub/epub.html;
|
|
}
|
|
|
|
location /epub/epub.js {
|
|
alias /opt/wrolpi/app/public/epub/epub.js;
|
|
}
|
|
|
|
location /epub/jszip.min.js {
|
|
alias /opt/wrolpi/app/public/jszip.min.js;
|
|
}
|
|
|
|
location / {
|
|
# React APP
|
|
proxy_pass http://127.0.0.1:5000;
|
|
rewrite $1 break;
|
|
}
|
|
|
|
location /sockjs-node {
|
|
proxy_pass http://127.0.0.1:5000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
}
|
|
|
|
location /api {
|
|
proxy_pass http://127.0.0.1:8081;
|
|
rewrite /^api(.*)$ $1 break;
|
|
}
|
|
|
|
location /docs {
|
|
proxy_pass http://127.0.0.1:8081;
|
|
rewrite /^docs(.*)$ $1 break;
|
|
}
|
|
|
|
location /media {
|
|
# The media files mounted in the docker volume
|
|
sendfile on;
|
|
sendfile_max_chunk 1m;
|
|
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
|
|
autoindex on;
|
|
autoindex_exact_size off;
|
|
alias /media/wrolpi;
|
|
}
|
|
|
|
location /download {
|
|
# Assume any request here is to download a file from the media directory.
|
|
if ( $request_filename ~ '^.*/(.+)$' ) {
|
|
# Always include the filename for downloads.
|
|
add_header Content-Disposition 'attachment; filename="$1"';
|
|
}
|
|
|
|
sendfile on;
|
|
sendfile_max_chunk 1m;
|
|
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
|
|
autoindex on;
|
|
autoindex_exact_size off;
|
|
alias /media/wrolpi;
|
|
}
|
|
|
|
}
|
|
|
|
}
|