Skip to content

Instantly share code, notes, and snippets.

@samundra
Created December 6, 2016 09:02
Show Gist options
  • Save samundra/edb1a1423d560ebd2b62ab80dc9d5ec3 to your computer and use it in GitHub Desktop.
Save samundra/edb1a1423d560ebd2b62ab80dc9d5ec3 to your computer and use it in GitHub Desktop.
adminer nginx configuration
server {
listen 80;
listen [::]:80;
root /var/www/adminer;
index index.php index.html index.htm;
server_name adminer.dev;
location / {
autoindex on;
try_files $uri $uri/ /index.php$is_args$args;
}
access_log off;
error_log /var/www/adminer-error.log error;
sendfile off;
client_max_body_size 100m;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment