Last active
May 15, 2018 14:27
-
-
Save benhartwich/b5b266f444c86c40746c to your computer and use it in GitHub Desktop.
WordPress Login Auth Nginx
This file contains hidden or 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-login.php { | |
satisfy any; | |
allow 62.218.34.128/28; | |
deny all; | |
auth_basic "Please Login"; | |
auth_basic_user_file ssl/.htpasswd; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
include /etc/nginx/fastcgi_params; | |
try_files $uri =404; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | |
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_buffer_size 128k; | |
fastcgi_buffers 4 128k; | |
fastcgi_busy_buffers_size 256k; | |
} | |
location ~* /wp-signup.php { | |
satisfy any; | |
allow 62.218.34.128/28; | |
deny all; | |
auth_basic "Please Login"; | |
auth_basic_user_file ssl/.htpasswd; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
include /etc/nginx/fastcgi_params; | |
try_files $uri =404; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | |
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock; | |
fastcgi_index index.php; | |
#fastcgi_buffer_size 128k; | |
#fastcgi_buffers 4 128k; | |
#fastcgi_busy_buffers_size 256k; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment