Skip to content

Instantly share code, notes, and snippets.

@abenbachir
Created February 16, 2016 00:16
Show Gist options
  • Save abenbachir/c67af8a77eba46c4fe8d to your computer and use it in GitHub Desktop.
Save abenbachir/c67af8a77eba46c4fe8d to your computer and use it in GitHub Desktop.
Nginx phpmyadmin configuration
server {
listen 80;
server_name phpmyadmin.dev;
client_max_body_size 8M;
access_log /var/log/nginx/phpmyadmin.access_log;
error_log /var/log/nginx/phpmyadmin.error_log warn;
root /var/www/phpmyadmin;
location / {
try_files $uri /index.php?$args;
}
index index.php index.html;
fastcgi_index index.php;
location ~ \.php($|/) {
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+\.php)(/.*)") {
set $script $1;
set $path_info $2;
}
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include /etc/nginx/fastcgi_params;
keepalive_timeout 0;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment