Skip to content

Instantly share code, notes, and snippets.

@tuxmartin
Created August 25, 2020 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxmartin/1491989d0cfd95084f137861530dbc6c to your computer and use it in GitHub Desktop.
Save tuxmartin/1491989d0cfd95084f137861530dbc6c to your computer and use it in GitHub Desktop.
apache http basic auth for url wp-login.php
# --- HTTP BASIC AUTH /wp-login.php ------------------
SetEnvIf Request_URI "/wp-login.php" auth=1
AuthName "Please login."
AuthType Basic
AuthUserFile /var/www/.htpasswd
Order Allow,Deny
Satisfy any
Allow from all
Require valid-user
Deny from env=auth
# --- HTTP BASIC AUTH /wp-login.php ------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment