# Configuration for phpMyAdmin -- set it up to use php-fpm etc. server { listen 80; listen 8081; root /home/gliders/phpma; index index.php index.html index.htm; server_name _; # update with actual hostname when we get it location / { try_files $uri $uri/ /index.php; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; # Serve static files directly location ~* \.(png|jpe?g|gif|ico)$ { expires 1y; access_log off; try_files $uri $uri/ @rewrite; gzip off; } location ~* \.(css|js)$ { expires 1d; access_log off; } location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }