Skip to content

Instantly share code, notes, and snippets.

@waja
Created December 16, 2013 22:38
Show Gist options
  • Save waja/7995719 to your computer and use it in GitHub Desktop.
Save waja/7995719 to your computer and use it in GitHub Desktop.
Nginx phpmyadmin config for wheezy
location /phpmyadmin {
root /usr/share/;
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
location ~ /(libraries|setup/frames|setup/libs) {
deny all;
}
location ~ ^/phpmyadmin/setup/(.+\.php)$ {
auth_basic "phpMyAdmin Setup";
auth_basic_user_file "/etc/phpmyadmin/htpasswd.setup";
alias /usr/share/phpmyadmin/setup/$1;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment