server { listen 81; server_name localhost; root /usr/share/phpmyadmin; index index.php index.html index.htm; if (!-e $request_filename) { rewrite ^/(.+)$ /index.php?url=$1 last; break; } location ~ .php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include /etc/nginx/fastcgi_params; } }