diff --git a/site/src/site/sphinx/en/web-console.md b/site/src/site/sphinx/en/web-console.md index 5a7d96f6afe..f05aa078abd 100644 --- a/site/src/site/sphinx/en/web-console.md +++ b/site/src/site/sphinx/en/web-console.md @@ -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 @@ -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 ``` @@ -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/; } } @@ -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`. @@ -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://localhost:8564](http://localhost: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)