Skip to content

Commit

Permalink
fix some typos; add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Hearen committed Oct 13, 2018
1 parent 19b5936 commit f768448
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions site/src/site/sphinx/en/web-console.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Web Console
===========

### Info
### You should know

Arthas supports Web Console. When being attached successfully, users can access it: [http://localhost:8563/](http://localhost:8563/).
Arthas supports Web Console. When being attached successfully, users can access it at: [http://localhost:8563/](http://localhost:8563/).

Users can fill in the IP and connect to the remote Arthas as:
Users can fill up the IP and port to connect to the remote Arthas as:

![web console](_static/web-console-local.png)

### Basic Authentication

We can turn to reversed proxy (Nginx) to add basic authentication to ensure security. This can be easily achieved in Unix/Linux/Mac as follows:
We can turn to reversed proxy (Nginx) to add basic authentication to ensure security. This can be easily achieved in Unix/Linux/Mac. Take Ubuntu 16.04 as an example:

#### Install apache2-utils

Expand All @@ -26,15 +26,13 @@ sudo apt-get update && sudo apt-get upgrade

```
sudo htpasswd -c /etc/apache2/.htpasswd user1
# you will be prompted to enter the password here
# encoded password stored
$ cat /etc/apache2/.htpasswd
user1:$apr1$/woC1jnP$KAh0SsVn5qeSMjTtn0E9Q0
# encoded password stored
# another user, no need to use -c option here again
# add another user, no need to use -c option here again
sudo htpasswd /etc/apache2/.htpasswd user2
```

Expand All @@ -45,12 +43,14 @@ $ cat /etc/nginx/conf.d/arthas.conf
# after being authenticated, redirected to the proper address
server {
# testing in the same host, use another port to listen;
listen 8564;
auth_basic "Administrator Area";
auth_basic_user_file /etc/apache2/.htpasswd;
location / {
# after being authenticated, redirect the request to arthas at port: 8563;
proxy_pass http://localhost:8563/;
}
}
Expand All @@ -68,7 +68,6 @@ http {
include /etc/nginx/conf.d/*.conf;
# ...
}
```

Restart Nginx: `sudo service nginx restart`; if there is anything wrong, please check `tail -f -n 100 /var/log/nginx/error.log`.
Expand All @@ -82,6 +81,7 @@ Restart Nginx: `sudo service nginx restart`; if there is anything wrong, please
$ bin/as.sh
```

Access `http://127.0.0.1:8564` now.
Access [http://127.0.0.1:8564](http://127.0.0.1:8564) now.


If you have suggestions for the Web Console, please leave a message here: [https://github.com/alibaba/arthas/issues/15](https://github.com/alibaba/arthas/issues/15)

0 comments on commit f768448

Please sign in to comment.