nginx.conf 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. user cloudron;
  2. load_module "/usr/local/nginx/modules/ngx_http_auth_ldap_module.so";
  3. worker_processes 1;
  4. pid /run/nginx.pid;
  5. daemon off;
  6. # Send logs to stderr
  7. error_log /dev/stderr warn;
  8. events {
  9. worker_connections 768;
  10. }
  11. http {
  12. include /run/ldap.conf;
  13. error_log /dev/stderr warn;
  14. log_format simple '$remote_addr [$time_local] "$request" $status $body_bytes_sent "$http_referer"';
  15. access_log /dev/stdout simple;
  16. include /etc/nginx/mime.types;
  17. client_body_temp_path /tmp/client_body 1 2;
  18. proxy_temp_path /tmp/proxy_temp 1 2;
  19. fastcgi_temp_path /tmp/fastcgi_temp 1 2;
  20. uwsgi_temp_path /tmp/uwsgi_temp 1 2;
  21. scgi_temp_path /tmp/scgi_temp 1 2;
  22. proxy_buffering off;
  23. proxy_cache_path /tmp/proxy_cache levels=1:2 keys_zone=my_cache:10m max_size=100m inactive=60m use_temp_path=off;
  24. proxy_cache my_cache;
  25. server {
  26. error_log /dev/stderr warn;
  27. listen 8000 default_server;
  28. server_name _;
  29. proxy_read_timeout 120s;
  30. location /check {
  31. proxy_pass http://localhost:3000/syncthing/app.js;
  32. }
  33. location / {
  34. auth_ldap "Forbidden";
  35. auth_ldap_servers cloudron;
  36. proxy_pass http://localhost:3000;
  37. }
  38. }
  39. }