Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
When the Nginx Server is deployed inside a GitLab App (Omnibus), the htpasswd file should be placed elsewhere : so /etc/nginx/ (no such a repertory) should be remplaced by /var/opt/gitlab/nginx/conf/ everywhere in this How To.
Step 1 : the same $ sudo apt-get install apache2-utils
Step 2 :
$ sudo htpasswd -c /etc/nginx/.htpasswd nginx by $ sudo htpasswd -c /var/opt/gitlab/nginx/conf/.htpasswd nginx (nginx is the user name)$ sudo cat /var/opt/gitlab/nginx/conf/.htpasswdStep 3 becomes : Updating the GitLab Configuration
htpasswd file path with GitLab.gitlab.rb file with $ sudo nano /etc/gitlab/gitlab.rbnginx['custom_gitlab_server_config'] = "auth_basic 'Restricted';\n auth_basic_user_file /var/opt/gitlab/nginx/conf/.htpasswd;\n", then save and quitStep 4 : Apply the changes and reconfigure GitLab with $ sudo gitlab-ctl reconfigure
If want add a user into htpasswd, just $ sudo htpasswd /etc/nginx/.htpasswd new_user
While the tutorial says: “sudo nano /etc/nginx/sites-available/default”
If you have already setup your website you should use: “sudo nano /etc/nginx/sites-available/your_site”