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

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

问题描述

我将 AWS Beanstalk 用于我的 Django/Python 应用程序,并且我想使用 Google 的 mod_pagespeed 模块.是否可以使用 .ebextensions/.config 文件安装和运行 mod_pagespeed?

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?

推荐答案

下载包

将 rpm 添加到您的 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 Beanstalk 的 .ebextensions 配置来安装 mod_pagespeed Apache 模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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