Forked from anonymous/gist:f5eb359a7b140fd94da4e111a57c928e
Created
November 16, 2017 11:12
-
-
Save mgussekloo/48b2238ae14532114064dbf27a647157 to your computer and use it in GitHub Desktop.
WP Admin pass protect on Laravel Forge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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