I added an htpasswd.txt to sites-avaiable/default to protect my site:
server {
auth_basic "closed site";
auth_basic_user_file /tmp/.htpasswd.txt;
listen 81 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/path/to/root
index index.html index.htm;
server_name ipaddress;
Now that i’m trying to remove it, I can’t get rid of a .htpasswd protection I set up previously. I’ve tried everything from creating .htaccess in the root of my site with satisfy any like this post suggests and this, to deleting the reference to htpasswd.txt from my sites-available/default file, to reinstalling nginx. I can’t find where this htpasswd file is being referenced somewhere from because nothing seems to get rid of it. Lastly I tried deleted the htpasswd.txt file and that just broke the login.
I want the whole site to be available with no htpasswd.
I also did a grep search to find out if the htpasswd file is being called for and it’s no where to be found. What can I do?
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!
@sugarhill yup. I feel it may be referenced somewhere else but I’ve looked everywhere. Cant get rid of this password prompt.
@sugarhill no problem at all. I simply have spent a day and a half stuck on this and i’m drained of ideas. Any other input is welcome and you’ve given me a couple so thanks. I actually tried those other files as well and nothing is there. Thanks again.
This is how I did it on my password protected nginx site:
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.