You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason Long <ha...@yahoo.com.INVALID> on 2021/02/09 15:07:53 UTC

[users@httpd] How to set a password for the WordPress logging page?

Hello,
I want to set a password for the WordPress logging page and when someone visit "https://mywebsite.com/wp-admin" then Apache asks a username and password and then show the logging page. Something like https://www.tecmint.com/phpmyadmin-login-password-protection-htaccess/
If my WordPress directory is "/var/www/wp", then is below lines OK?

<Directory /var/www/wp/wp-admin/>
    AuthType Basic
    AuthName "Restricted Content"
    AuthUserFile /etc/httpd/.htpasswd
    Require valid-user
</Directory>

Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to set a password for the WordPress logging page?

Posted by Jason Long <ha...@yahoo.com.INVALID>.
Thank you.
I added a ".WPhtpasswd" file as below:
# htpasswd -c /etc/httpd/.WPhtpasswd "Panel User"

Then, added below lines in the ".htpasswd" file under the WordPress directory:
AuthType Digest
AuthName "Password Protected"
AuthDigestDomain /wp-login.php https://www.MyWebSite.com/wp-login.php
AuthUserFile /etc/httpd/.WPhtpasswd
Require valid-user
Satisfy All

But, it asks me the username and password for visit the website and not just "wp-login.php" and when I enter my username and password then it ask them again!

Which line is incorrect?






On Tuesday, February 9, 2021, 06:39:57 PM GMT+3:30, Eric Covener <co...@gmail.com> wrote: 





On Tue, Feb 9, 2021 at 10:08 AM Jason Long <ha...@yahoo.com.invalid> wrote:
>
> Hello,
> I want to set a password for the WordPress logging page and when someone visit "https://mywebsite.com/wp-admin" then Apache asks a username and password and then show the logging page. Something like https://www.tecmint.com/phpmyadmin-login-password-protection-htaccess/
> If my WordPress directory is "/var/www/wp", then is below lines OK?
>
> <Directory /var/www/wp/wp-admin/>
>    AuthType Basic
>    AuthName "Restricted Content"
>    AuthUserFile /etc/httpd/.htpasswd
>    Require valid-user
> </Directory>

Try it and see?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to set a password for the WordPress logging page?

Posted by Eric Covener <co...@gmail.com>.
On Tue, Feb 9, 2021 at 10:08 AM Jason Long <ha...@yahoo.com.invalid> wrote:
>
> Hello,
> I want to set a password for the WordPress logging page and when someone visit "https://mywebsite.com/wp-admin" then Apache asks a username and password and then show the logging page. Something like https://www.tecmint.com/phpmyadmin-login-password-protection-htaccess/
> If my WordPress directory is "/var/www/wp", then is below lines OK?
>
> <Directory /var/www/wp/wp-admin/>
>     AuthType Basic
>     AuthName "Restricted Content"
>     AuthUserFile /etc/httpd/.htpasswd
>     Require valid-user
> </Directory>

Try it and see?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org