Skip to content

Instantly share code, notes, and snippets.

@cipulan
Forked from jbradach/phpMyAdmin Nginx Config
Last active September 10, 2024 03:03
Show Gist options
  • Save cipulan/fadb61aeab84323fa56283a4821b6170 to your computer and use it in GitHub Desktop.
Save cipulan/fadb61aeab84323fa56283a4821b6170 to your computer and use it in GitHub Desktop.
Nginx location block for phpMyAdmin using an alias.
location /pma {
alias /usr/share/phpmyadmin;
location ~ \.php$ {
try_files $uri /index.php =404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php8.0-fpm-dev.sock;
fastcgi_index index.php;
}
}
@cipulan
Copy link
Author

cipulan commented Sep 10, 2024

Add sysmlink to parent directory so thats image will works

lrwxrwxrwx 1 dev dev 21 Sep 10 09:38 pma -> /usr/share/phpmyadmin/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment