是否可以使用AWS青苗的.ebextensions配置安装mod_pagespeed Apache模块?青苗、可以使用、模块、AWS

由网友(べ残念ァ)分享简介:我使用AWS魔豆我的Django / Python应用程序,我想使用谷歌的mod_pagespeed模块。是否可以安装和运行使用.ebextensions mod_pagespeed / config文件?I'm using AWS Beanstalk for my Django/Python application...

我使用AWS魔豆我的Django / Python应用程序,我想使用谷歌的mod_pagespeed模块。是否可以安装和运行使用.ebextensions mod_pagespeed / config文件?

I'm using AWS Beanstalk for my Django/Python application, and I would like to use Google's mod_pagespeed module. Is it possible to install and run mod_pagespeed using the .ebextensions/.config file?

推荐答案

下载包

加入转速到您的ebextensions目录

Add the rpm into your ebextensions directory

在.ebextensions目录下创建一个config文件

create a .config file in the .ebextensions directory

命令添加到这样的配置文件:

add commands to the config file like this:

container_commands:
    01-command:
        command:        rm -rf /pagespeed/ebextensions

    02-command:
        command:        mkdir -p /pagespeed/ebextensions

    03-command:
        command:        cp -R .ebextensions/* /pagespeed/ebextensions/

    04-command:
        command:        rpm -U /pagespeed/ebextensions/mod-pagespeed.rpm

确保命令缩进如图所示,没有标签,否则它不会工作。

Ensure the commands are indented as shown, with no tabs, otherwise it wont work.

交换MOD-pagespeed.rpm不管什么实际的RPM文件名是。

swap "mod-pagespeed.rpm" for whatever the actual rpm file name is.

阅读全文

相关推荐

最新文章