1 回答
TA贡献1784条经验 获得超8个赞
好的,我发现了问题所在。我在问题中链接的 Nginx 配方对 Omeka 有效,对 Omeka-s 无效。对于 Omeka-s,必须删除 /install 并编辑 /admin 位置。这是工作配置:
server {
server_name omeka.domain.tld;
root /var/www/omeka;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ \..*/.*\.php$ {
return 403;
}
location / {
try_files $uri /index.php?$args;
}
location /admin {
try_files $uri /index.php?$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_pass unix:/tmp/phpfpm.sock;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
}
更新
我已将此食谱推送到 Nginx wiki:
https://www.nginx.com/resources/wiki/start/topics/recipes/omeka-s/
- 1 回答
- 0 关注
- 121 浏览
添加回答
举报