Skip to content

Instantly share code, notes, and snippets.

@nickovchinnikov
Last active February 3, 2016 15:53
Show Gist options
  • Save nickovchinnikov/f3195f963c31cd5cdab4 to your computer and use it in GitHub Desktop.
Save nickovchinnikov/f3195f963c31cd5cdab4 to your computer and use it in GitHub Desktop.
Nginx phpmyadmin config
server {
listen 80;
server_name phpmyadmin.ru;
access_log /var/log/nginx/phpmyadmin.local.access.log;
error_log /var/log/nginx/phpmyadmin.local.error.log;
root /usr/share/phpmyadmin;
index index.php;
location / {
# Redirect everything that isn't a real file to index.php
index index.html index.php;
}
# uncomment to avoid processing of calls to non-existing static files by Yii
location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
try_files $uri =404;
}
#error_page 404 /404.html;
location ~ \.php$ {
include fastcgi_params;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/php5-fpm.sock;
try_files $uri =404;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.(ht|svn|git) {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment