Nginx 設定 Chevereto 偽靜態規則
6,263 0
Chevereto 是目前最強大的 PHP 圖床系統,透過它可部署多使用者公開或私有的圖片儲存服務,現在 Chevereto 推出了免費版本,大家可以看看 https://github.com/Chevereto/Chevereto-Free
Chevereto 預設提供基於 Apache 環境的偽靜態規則,如果伺服器是 Nginx 的話,可以使用下面的偽靜態規則
Nginx Nginx
location / {
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
try_files $uri $uri/ /api.php;
}
location /admin {
try_files $uri /admin/index.php?$args;
}
評論
(0)暫無評論,來說兩句吧