是否可以使用AWS青苗的.ebextensions配置安装mod_pagespeed Apache模块? [英] Is it possible to use AWS Beanstalk's .ebextensions config to install mod_pagespeed Apache module?

查看:230
本文介绍了是否可以使用AWS青苗的.ebextensions配置安装mod_pagespeed Apache模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用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.

这篇关于是否可以使用AWS青苗的.ebextensions配置安装mod_pagespeed Apache模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆