Comments (7)
Hi silasrm,
when we initially added docker support, the docker API was exposed without any authentication, so if you wanted to remotely communicate with a docker server through the API you had to use a proxy to encrypt the traffic, otherwise it would be completely insecure. On that article we have used the example of setting nginx on the docker server, starting docker to listen on tcp localhost 4243, and proxying it's traffic through nginx. So the client would end up communicating with the docker server through basic auth added by nginx. If you want to use this setup, the basic auth config should be setup on an nginx's conf file, example /etc/nginx/sites-enabled/default, inside the server section.
However, the latest versions of Docker now support tls authentication using certs, which I highly recommend. If you want to use tls authentication with mist.io have a look on the docker's page and on mist.io docs
https://docs.docker.com/articles/https/
http://docs.mist.io/article/20-adding-docker
Regards,
Markos
from mist-ce.
Hi @mgogoulos,
Thank you to reply.
I'll try the TLS auth.
But, how I can add auth to access my mist.io panel? I'm access the mist.io panel using IP/domain with port 8000.
Thk's
from mist-ce.
In order to add basic auth to mist.io panel, you can setup nginx to proxypass port 8000 (where mist.io listens) to port 80 and add the basic auth, so you can access mist.io on port 80 of the server. On my Ubuntu system this is what I did:
-
install nginx
apt-get install nginx -
vi /etc/nginx/sites-enabled/default and add this
server {
listen 80 default_server;
server_name localhost;
location / {
proxy_pass http://127.0.0.1:8000;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
}
}
and restart nginx
root@user:/home/# /etc/init.d/nginx restart
- then
root@user:/home/# apt-get install apache2-utils
root@user:/home/# htpasswd -c /etc/nginx/.htpasswd user
New password:
Re-type new password:
Adding password for user user
I add a user/password
So I now open the browser on
http://localhost and it asks for the user/password. Then it will load mist.io
from mist-ce.
Hi @mgogoulos,
In my server, I wont put the mist on the root of the webserver, then I'm use this config:
server {
...
location /mist/ {
proxy_pass http://localhost:8000; #or http://127.0.0.1:8000
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
}
...
}
But, when I access http://domain.com/mist/ return: 404. Got lost in the clouds.
Any idea to solve this? This is my first contact to nginx :(
*I managed to put the docker authenticating via TLS. :D
from mist-ce.
I think it has to be on the top level (/). If you have domain.com on this server and you cannot put mist.io on the top level, you can create another dns name for the mist host (or set an alias on /etc/hosts).
For example I set an entry on /etc/hosts for misthost.com and then set mist.io for this servername, so it is on the top level (/).
server {
listen 80;
server_name misthost.com;
location / {
proxy_pass http://127.0.0.1:8000;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
}
}
Hope it helps
from mist-ce.
@mgogoulos Dude, many thank's to help me. This work now!
👯 🎈 👯 🎈
from mist-ce.
Very glad to read this!
from mist-ce.
Related Issues (20)
- Bad Gateway HOT 2
- Unable to create file through scripts in a vm HOT 2
- Mist sends invalid requests to SMTP mail server HOT 6
- GCP - No cost information? HOT 1
- 5.00alpha3.0 shell doesn't connect to commercial cloud machines HOT 1
- 5.00alpha3 shell doesn't connect to commercial cloud machines
- AWS China Ningxia Datacenter doesn't return cost HOT 1
- RDS & ELB for aws HOT 6
- Helm Install failing without giving much information about the cause. HOT 3
- Is there a cloud provider for Azure China instead of just Azure? HOT 1
- How to upload certificate for docker HOT 1
- Outscale HOT 1
- mistio via docker-compose unable to save keys
- Machine creation failed: Linode
- installation on K8S
- Install mist.io on Kubernetes failed
- Adding a NodeWeaver/OpenNebula cloud provider HOT 1
- The official documentation is inaccessible.
- Helm chart installation failing due to duplicate key in template file
- Update README.md about the project being dead
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mist-ce.