nginx(ubuntu)设置别名访问目录

时间:2024-07-22 19:03:44
1
2
3
4
5
6
7
8
9
10
11
12
13
location /phpmyadmin/ {
alias  /data/phpmyadmin/;
index  index.html index.htm index.php;
}
location ~ ^/phpmyadmin/.+\.php$ {
root /data/;
rewrite /phpmyadmin/(.*\.php?) /$1 break;
include fcgi.conf;
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
fastcgi_param SCRIPT_FILENAME /data/phpmyadmin$fastcgi_script_name;
}