How to disable http authentication on nginx


In this tutorial we will show you how to disable the http authentication on your application vpsies which was added to protect your not finished installation from fraudulent use.

To do so you will have to use your favourite editor and edit your virtual host configuration file at /etc/nginx/conf.d/default.conf

Please comment out or remove the following lines from your configuration:

auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;

When done restart the nginx by running the following command:

#service nginx restart

Now you will be able to access your application with your browser without having the authentication.


You can actually try those Nginx steps on our platform in few minutes utilizing our PCS (Private Cloud Solution) which allows you to have VPSie(s) on a private network – NAT – Port forward – traffic control for inbound and outbound – multiple gateway IPs which you could use for the load-balancing and failover.

Related Articles