Basic Nginx Auth for Linux HT
Last updated
Last updated
To enable basic HTTP authentication on you HyperTest Dashboard, we will deploy a Nginx Proxy in front of it.
Here we cannot the Nginx shipped with HyperTest as the configuration for that one gets overridden while upgrading HyperTest.
Here we are deploying one Nginx server which will run as docker container. The requests coming to Nginx server (running on port 8003) will be forwarded to your HyperTest Dashboard
Create a folder nginx-proxy
We will use openssl to create password file Verify if you have openssl installed by following command
If not, install it using below command
Execute the below command to create password files on your host machine where HT is installed
Enter the password for "HyperTest" username. It will create a file .htpasswd in current directory
Now we will mount this file in our nginx docker container and reference the file in location blocks in nginx.conf wherever we want authentication.
Create the file docker-compose.yml with below contents in it
Create the below file nginx.conf with below contents in it
Change the post from 8003 in below nginx.conf if you want to use another port for authenticated HT dashboard
Start the Nginx server using below command:
Now Nginx server should be up and running, you can check it using below command:
To Verify the nginx setup, open the dashboard on http://<hypertest-vm-ip>:8003, it should redirect you to your original HT dahsboard.