nginx.conf 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. server {
  23. error_log /dev/stderr warn;
  24. listen 8000 default_server;
  25. server_name _;
  26. location /check {
  27. proxy_pass http://localhost:3000/syncthing/app.js;
  28. proxy_set_header Authorization "Basic YWRtaW46YWRtaW4=";
  29. }
  30. location / {
  31. auth_ldap "Forbidden";
  32. auth_ldap_servers cloudron;
  33. proxy_pass http://localhost:3000;
  34. proxy_set_header Authorization "Basic YWRtaW46YWRtaW4=";
  35. }
  36. }
  37. }