Skip to content

Instantly share code, notes, and snippets.

@progmult
Forked from denys281/nginx.conf
Last active November 11, 2016 16:06
Show Gist options
  • Save progmult/de0ad35cfddf284fb966f566a5be605b to your computer and use it in GitHub Desktop.
Save progmult/de0ad35cfddf284fb966f566a5be605b to your computer and use it in GitHub Desktop.
phpmyadmin nginx virtual host (php-fpm) freebsd
server {
# Listen on port 81
listen 81;
# Server name being used (exact name, wildcards or regular expression)
# server_name phpmyadmin.my;
root /usr/local/www/phpMyAdmin;
# Logging
access_log /var/log/nginx/phpmyadmin.access.log;
error_log /var/log/nginx/phpmyadmin.error.log;
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;
}
# Pass the PHP scripts to FastCGI server
location ~ \.php$ {
fastcgi_pass unix:/var/run/php5-fpm-pma.pid;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment