2022-11-10 更新 728 Views

imagevue.jpg

IMAGEVUE是一个老牌的图片相册管理系统,无需数据库,在APACHE上完美运行,但NGINX上需要更改下配置,之前用的时候因为NGINX配置不好所以把服务器从LNMP换成了LAMP,但LAMP在小机器上总显示不那么有优势,折腾了一下,又换回了NGINX,花了小半天的时间终于把配置问题解决了,这里记录一下,方便以后使用。

配置文件:

# X3 rewrite rules
location / {
if (!-e $request_filename){
# Rewrite any calls to html|json|xml|atom|rss if a folder matching * exists
rewrite (.+)\.(html|json|xml|atom|rss)$ $1/ last;
# Rewrite any calls to /render to the X3 image resizer
rewrite ^/render/. /app/parsers/slir/ last;
# Rewrite routes to X3 application index.php if they are non-existent file/dirs
rewrite ^(.*)$ /index.php?$1 last;
}
}
# Prevent web access to X3 /config and /_cache directories
location ~ /(config|_cache) {
deny all;
}
# PHP [OPTIONAL]
# PHP setup may vary, but you should already have PHP working for NGINX or for a website.
# Likely you may have a php.conf file to include.
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# With php5-cgi alone:
fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
# fastcgi_pass    unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

以上!