Skip to content

Instantly share code, notes, and snippets.

@jesgeerts
Created November 6, 2016 07:51
Show Gist options
  • Save jesgeerts/f1f21ea568337738dc01adaa193daac2 to your computer and use it in GitHub Desktop.
Save jesgeerts/f1f21ea568337738dc01adaa193daac2 to your computer and use it in GitHub Desktop.
This is for a nginx virtualhost block if you have phpmyadmin installed
server {
listen 80;
listen [::]80;
server_name YOURPHPMYADMIN.example.com;
index index.php
root /usr/share/phpmyadmin;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location /setup {
return 404;
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment