Skip to content

Instantly share code, notes, and snippets.

@moux2003
Created January 28, 2015 22:22
Show Gist options
  • Save moux2003/e0f3f44e9924be0c606a to your computer and use it in GitHub Desktop.
Save moux2003/e0f3f44e9924be0c606a to your computer and use it in GitHub Desktop.
Nginx conf for phpmyadmin
server {
listen 8080;
server_name localhost;
root /home/zareth/phpmyadmin;
location / {
index index.php;
}
## Images and static content is treated different
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 360d;
}
location ~ /\.ht {
deny all;
}
location ~ /(libraries|setup/frames|setup/libs) {
deny all;
return 404;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
#check your /etc/php5/fpm/pool.d/www.conf to see if fpm is listening on a socket or a port.
#;listen = /var/run/php5-fpm.sock
#listen = 127.0.0.1:9000
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/zareth/phpmyadmin$fastcgi_script_name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment