Created
July 28, 2012 00:01
-
-
Save guerrerocarlos/3191132 to your computer and use it in GitHub Desktop.
nginx fastcgi with auth
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
server{ | |
server_name www.ejemplo.com ejemplo.com; | |
auth_basic "Acceso restringido, solo permitido mediante credencial"; | |
auth_basic_user_file /var/www/archivo.access; | |
location / { | |
# host and port to fastcgi server | |
fastcgi_pass 127.0.0.1:8080; | |
fastcgi_param PATH_INFO $fastcgi_script_name; | |
fastcgi_param REQUEST_METHOD $request_method; | |
fastcgi_param QUERY_STRING $query_string; | |
fastcgi_param CONTENT_TYPE $content_type; | |
fastcgi_param CONTENT_LENGTH $content_length; | |
fastcgi_pass_header Authorization; | |
fastcgi_intercept_errors off; | |
fastcgi_param REMOTE_ADDR $remote_addr; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment