Is it possible to use AWS Beanstalk's .ebextensions config to install mod_pagespeed Apache module?

前端 未结 4 542
执念已碎
执念已碎 2020-12-29 12:43

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

4条回答
  •  半阙折子戏
    2020-12-29 13:35

    Download the package

    Add the rpm into your ebextensions directory

    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.

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

提交回复
热议问题