nginx.conf 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. auth_ldap_cache_enabled on;
  26. auth_ldap_cache_expiration_time 300000;
  27. auth_ldap_cache_size 100;
  28. server {
  29. error_log /dev/stderr warn;
  30. listen 8000 default_server;
  31. server_name _;
  32. proxy_read_timeout 120s;
  33. location /check {
  34. proxy_pass http://localhost:3000/syncthing/app.js;
  35. }
  36. location / {
  37. auth_ldap "Forbidden";
  38. auth_ldap_servers cloudron;
  39. proxy_pass http://localhost:3000;
  40. }
  41. }
  42. }