i have my phpmyadmin setup as such
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
i am looking to change the folder name so that i can access phpmyadmin through /secure
location /secure {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/secure/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location ~* ^/secure/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
but it keeps giving me 404 not found , any help would be appretiated guys thanks
The below works and tested
location /pma/ {
alias /usr/share/phpmyadmin/;
}
location ~ ^/pma/(.+\.php)$ {
alias /usr/share/phpmyadmin/$1;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
# From fastcgi_params
include fastcgi_params;
fastcgi_param DOCUMENT_ROOT /usr/share/phpmyadmin;
}
The key is to set the below
fastcgi_param DOCUMENT_ROOT /usr/share/phpmyadmin;
this is a variable that gets se in fastcgi_params but when to below it works like a charm change the 'pma' in both places to anything to u want and it'll work...no need for sym link
cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With