ini MODX Babel重写了nginx

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ini MODX Babel重写了nginx相关的知识,希望对你有一定的参考价值。

server {
    location / {
    
        # MODX babel rewrites
        rewrite ^/(en|de)/css(.*)$ /css$2 break;
    
        rewrite ^/(en|de)/js(.*)$ /js$2 break;
    
        rewrite ^/(en|de)/img(.*)$ /img$2 break;
    
        rewrite ^/(en|de)/assets(.*)$ /assets$2 break;
    
        rewrite ^/(en|de)/webfonts(.*)$ /webfonts$2 break;
    
        if (!-e $request_filename){
            rewrite ^/(en|de)?/?(.*)$ /index.php?cultureKey=$1&q=$2 last;
        }

    }
}

sh Ubuntu 14.04(nginx + php7-fpm):更新MODx 2.2

#!/bin/bash

echo "Enter username"
read USERNAME

##############

echo "Updating MODx"

cd /var/www/$USERNAME/www/

echo "Getting file from modx.com..."
sudo -u $USERNAME wget -O modx.zip http://modx.com/download/latest/
echo "Unzipping file..."
sudo -u $USERNAME unzip "./modx.zip" -d ./ > /dev/null

ZDIR=`ls -F | grep "modx-" | head -1`
if [ "${ZDIR}" = "/" ]; then
        echo "Failed to find directory..."; exit
fi

if [ -d "${ZDIR}" ]; then
        cd ${ZDIR}
        echo "Moving out of temp dir..."
        sudo -u $USERNAME cp -r ./* ../
        cd ../
        rm -r "./${ZDIR}"

        echo "Removing zip file..."
        rm "./modx.zip"

        cd "setup"
        echo "Running setup..."
        sudo -u $USERNAME php ./index.php --installmode=upgrade --config=/var/www/$USERNAME/config.xml

        echo "Done!"
else
        echo "Failed to find directory: ${ZDIR}"
        exit
fi

echo "Done"

以上是关于ini MODX Babel重写了nginx的主要内容,如果未能解决你的问题,请参考以下文章

ini MODX Revolution - nginx.conf

ini MODX Cloud中的Web规则(nginx conf),用于CDN,代理缓存资产和statcache

ini MODX Cloud中的Web规则(nginx conf),用于CDN,代理缓存资产和statcache

ini 在Nginx中将http重写为https

sh Ubuntu 14.04(nginx + php7-fpm):更新MODx 2.2

sh Ubuntu 14.04(nginx + php7-fpm):更新MODx 2.2