Skip to content

Instantly share code, notes, and snippets.

@nevergone
Created June 30, 2012 18:51
Show Gist options
  • Save nevergone/3025088 to your computer and use it in GitHub Desktop.
Save nevergone/3025088 to your computer and use it in GitHub Desktop.
location /foo/bar {
auth_basic "Auth name";
auth_basic_user_file /etc/phpmyadmin/htpasswd;
try_files $uri/ $uri/index.php;
}
location ~ ^/foo/bar(.+\.php)$ {
alias /usr/share/phpmyadmin$1;
fastcgi_pass unix:/var/run/php5-fpm/www-data.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/phpmyadmin$1;
fastcgi_param HTTPS on;
include fastcgi_params;
}
location ~* ^/foo/bar/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
alias /usr/share/phpmyadmin/$1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment