1
0
mirror of https://git.cloudron.io/cloudron/syncthing-app synced 2025-09-24 22:07:36 +00:00

Added a proxy to provide ldap auth and make health check work

This commit is contained in:
Dennis Schwerdel
2017-05-08 07:56:55 +02:00
parent 5455b78124
commit b700f42b17
7 changed files with 94 additions and 12 deletions

43
nginx.conf Normal file
View File

@@ -0,0 +1,43 @@
user cloudron;
load_module "/usr/local/nginx/modules/ngx_http_auth_ldap_module.so";
worker_processes 1;
pid /run/nginx.pid;
daemon off;
# Send logs to stderr
error_log /dev/stderr warn;
events {
worker_connections 768;
}
http {
include /run/ldap.conf;
error_log /dev/stderr warn;
log_format simple '$remote_addr [$time_local] "$request" $status $body_bytes_sent "$http_referer"';
access_log /dev/stdout simple;
include /etc/nginx/mime.types;
client_body_temp_path /tmp/client_body 1 2;
proxy_temp_path /tmp/proxy_temp 1 2;
fastcgi_temp_path /tmp/fastcgi_temp 1 2;
uwsgi_temp_path /tmp/uwsgi_temp 1 2;
scgi_temp_path /tmp/scgi_temp 1 2;
server {
error_log /dev/stderr warn;
listen 8000 default_server;
server_name _;
location /check {
proxy_pass http://localhost:3000/syncthing/app.js;
proxy_set_header Authorization "Basic YWRtaW46YWRtaW4=";
}
location / {
auth_ldap "Forbidden";
auth_ldap_servers cloudron;
proxy_pass http://localhost:3000;
proxy_set_header Authorization "Basic YWRtaW46YWRtaW4=";
}
}
}