Skip to content

Instantly share code, notes, and snippets.

@alherd-by
Created September 29, 2014 12:37
Show Gist options
  • Save alherd-by/9ffc0d3a0051581151d8 to your computer and use it in GitHub Desktop.
Save alherd-by/9ffc0d3a0051581151d8 to your computer and use it in GitHub Desktop.
server {
server_name www.adminer.dev.unet.by;
return 301 $scheme://adminer.dev.unet.by$request_uri;
}
server {
server_name adminer.dev.unet.by;
root /home/www/adminer;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_read_timeout 300;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment