photogallery X3 的 nginx 配置文件

配置文件:nginx

# Imagevue
# Rewrite any calls to *.html, *.json, *.xml, *.atom, *.rss, *.rdf or *.txt if a folder matching * exists
if (!-f $request_filename) {
set $rule_0 1$rule_0;
}
if ($uri !~ “public/”) {
set $rule_0 2$rule_0;
}
if (!-f $document_root/public/$1.$2) {
set $rule_0 3$rule_0;
}
if ($rule_0 = “321”) {
rewrite /(.+).(html|json|xml|atom|rss|rdf|txt)$ /$1/ last;
}

# Rewrite any calls to /render to the image parser
if ($uri ~ “render/”) {
rewrite ^/render/. /app/parsers/slir/ last;
}

# Rewrite any calls to /* or /app to the index.php file
if ($uri ~ “/app/$”) {
rewrite ^/app/ /index.php last;
}

# Rewrite any calls to /* or /app to the index.php file
if (!-f $request_filename) {
set $rule_3 1$rule_3;
}
if (!-d $request_filename) {
set $rule_3 2$rule_3;
}
if ($rule_3 = “21”){
rewrite ^/(.*)/$ /index.php?/$1/ last;
}

# Rewrite any file calls to the public directory
if (!-f $request_filename) {
set $rule_4 1$rule_4;
}
if (!-d $request_filename) {
set $rule_4 2$rule_4;
}
if ($uri !~ “public/”) {
set $rule_4 3$rule_4;
}
if ($rule_4 = “321”){
rewrite ^/(.+)$ /public/$1 last;
}

# Prevent access to .txt & .yml files
location ~ “.(txt|yml)$” {
deny all;
}

# Increase cookie security
# Add fastcgi_param PHP_VALUE “session.cookie_httponly true”

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据