Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorization for admin zone #112

Open
ponasromas opened this issue Feb 5, 2019 · 3 comments
Open

Authorization for admin zone #112

ponasromas opened this issue Feb 5, 2019 · 3 comments

Comments

@ponasromas
Copy link

Hello,

How to implement basic authorization to the admin area of gstream? Is it possible at all?

@zhangping
Copy link
Contributor

use nginx as the proxy

@ponasromas
Copy link
Author

Could you drop some simple example? I've tried with Apache proxy but with null results.

@zhangping
Copy link
Contributor

zhangping commented Feb 7, 2019

https://christianfei.com/posts/setup-nginx-as-a-reverse-proxy-with-basic-auth-for-an-upstream/

my nginx conf example:

worker_processes 4;

events {
  worker_connections 1024;
}

http {
  upstream app {
    server 127.0.0.1:20118;
    keepalive 64;
  }

  server {
    listen *:20228;
    server_name _;
    access_log /var/log/nginx/nginx.access.log;
    error_log /var/log/nginx/nginx.error.log;
    auth_basic "Restricted Area";
    auth_basic_user_file /etc/nginx/.htpasswd;

    location / {
      proxy_pass http://app;
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants