Add ONLYOFFICE DocSpace app (15 services, Community Edition)
This commit is contained in:
4
apps/docspace/data/config/nginx/letsencrypt.conf
Normal file
4
apps/docspace/data/config/nginx/letsencrypt.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
location ^~ /.well-known/acme-challenge/ {
|
||||
root /letsencrypt;
|
||||
default_type "text/plain";
|
||||
}
|
||||
33
apps/docspace/data/config/nginx/nginx.conf.template
Normal file
33
apps/docspace/data/config/nginx/nginx.conf.template
Normal file
@@ -0,0 +1,33 @@
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /tmp/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
client_body_temp_path /tmp/client_temp;
|
||||
proxy_temp_path /tmp/proxy_temp_path;
|
||||
fastcgi_temp_path /tmp/fastcgi_temp;
|
||||
uwsgi_temp_path /tmp/uwsgi_temp;
|
||||
scgi_temp_path /tmp/scgi_temp;
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
||||
30
apps/docspace/data/config/nginx/onlyoffice-proxy.conf
Normal file
30
apps/docspace/data/config/nginx/onlyoffice-proxy.conf
Normal file
@@ -0,0 +1,30 @@
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $proxy_connection;
|
||||
proxy_set_header Host $this_host;
|
||||
proxy_set_header X-Forwarded-Host $proxy_x_forwarded_host;
|
||||
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_hide_header 'Server';
|
||||
proxy_hide_header 'X-Powered-By';
|
||||
proxy_buffering off;
|
||||
proxy_http_version 1.1;
|
||||
|
||||
proxy_buffer_size 128k;
|
||||
proxy_buffers 8 128k;
|
||||
proxy_busy_buffers_size 256k;
|
||||
|
||||
access_log /var/log/nginx/access-proxy.log;
|
||||
error_log /var/log/nginx/error-proxy.log;
|
||||
|
||||
server {
|
||||
listen 0.0.0.0:80;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
client_max_body_size 4G;
|
||||
|
||||
location / {
|
||||
proxy_pass http://$router_host:8092;
|
||||
}
|
||||
|
||||
include includes/letsencrypt.conf;
|
||||
}
|
||||
32
apps/docspace/data/config/nginx/proxy.upstream.conf.template
Normal file
32
apps/docspace/data/config/nginx/proxy.upstream.conf.template
Normal file
@@ -0,0 +1,32 @@
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
|
||||
map $http_host $this_host {
|
||||
"" $host;
|
||||
default $http_host;
|
||||
}
|
||||
|
||||
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
|
||||
default $http_x_forwarded_proto;
|
||||
"" $scheme;
|
||||
}
|
||||
|
||||
map $http_x_forwarded_host $proxy_x_forwarded_host {
|
||||
default $http_x_forwarded_host;
|
||||
"" $this_host;
|
||||
}
|
||||
|
||||
map $http_x_forwarded_port $proxy_x_forwarded_port {
|
||||
default $http_x_forwarded_port;
|
||||
'' $server_port;
|
||||
}
|
||||
|
||||
map $http_upgrade $proxy_connection {
|
||||
default upgrade;
|
||||
"" close;
|
||||
}
|
||||
|
||||
map $ROUTER_HOST $router_host {
|
||||
volatile;
|
||||
default onlyoffice-router;
|
||||
~^(.*)$ $1;
|
||||
}
|
||||
Reference in New Issue
Block a user