Skip to content

Instantly share code, notes, and snippets.

Created November 16, 2017 11:11
Show Gist options
  • Save anonymous/f5eb359a7b140fd94da4e111a57c928e to your computer and use it in GitHub Desktop.
Save anonymous/f5eb359a7b140fd94da4e111a57c928e to your computer and use it in GitHub Desktop.
WP Admin pass protect on Laravel Forge
location ~ ^/(wp-admin)/ {
auth_basic "Restricted Access";
auth_basic_user_file /home/forge/domain/.htpasswd;
location ~ .php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment