htaccess password dialog shown on home route

0

I created a droplet that has Wordpress installed on Digital Ocean. When I visit the homepage "/", I am required to input the .htaccess credentials in a dialog that shows up.

I noticed this statement in the shell when I ssh my droplet: "Your /wp-admin is protected by Apache using .htaccess credentials"

I do like the idea that my /wp-admin will be protected by this dialog but I don't wish this dialog to show up when a guest visits my blog's homepage ( http://www.awesomeweb.com ). Is this some kind of a glitch/bug? How do I remove or fix the .htaccess dialog to either show up for /wp-admin or not show up at all (as its disturbing for the site's viewers)?

My apache2.conf file can be found here.

Stefanos.Ioannou

Posted 2014-03-25T13:01:15.683

Reputation: 215

Answers

1

Your problem is this part of the site:

<script type="text/javascript">var src="http://www.awesomeweb.com/wp-admin/admin-ajax.php?action=wordfence_logHuman&hid=CE14A685241DC966F0C8BAAC20710796"; if(window.location.protocol == "https:"){ src = src.replace("http:", "https:"); } var wfHTImg = new Image();  wfHTImg.src=src;</script>

I do not know what this script does, but you should try to see if it can work when moved out of /wp-admin/ folder. You should try moving it out to root directory, and changing the mentioned script to see if it works.

It might have few includes inside it (open it and see), but you should be able to edit those includes so that instead of include('some.php'); they are include('wp-admin/some.php') since php includes are not affected by .htaccess permissions.

Let me know if this works for you.

dkasipovic

Posted 2014-03-25T13:01:15.683

Reputation: 842

This code segment was added when I included the wordfence plugin. The issue was there before I add the plugin. – Stefanos.Ioannou – 2014-03-25T13:17:45.907

1Well, the issue is that something from your index file is "calling" on something from wp-admin. As long as there are includes from wp-admin, like the one I am mentioning up there, you will be getting the authentication pop-up. – dkasipovic – 2014-03-25T13:18:43.000

hmmm i see. let me check then. – Stefanos.Ioannou – 2014-03-25T13:19:54.587

Update: When I remove the included files it goes away. Thanks, I will figure out whats wrong. – Stefanos.Ioannou – 2014-03-25T13:27:43.263