Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9212307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:29:43+00:00 2026-06-18T01:29:43+00:00

I want to gzip the JavaScript, HTML, CSS in my war before it goes

  • 0

I want to gzip the JavaScript, HTML, CSS in my war before it goes over the wire. standard web stuff. Beanstalk uses an AMI to scale up.

I see the directions on how to create a new AMI, but I don’t even see where Tomcat is located. The current AMI as of this writing is ami-1a249873 for Tomcat 7 deployments.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T01:29:44+00:00Added an answer on June 18, 2026 at 1:29 am

    I’ll answer this myself. Just so its clear to everyone, you CAN connect to your instances of EC2 even though they are being managed by beanstalk. This is helpful because you get to see where things are located. In this case, I didn’t know Apache was being used as the webserver for tomcat and had to search for that, but you can find it here as today:

    /etc/httpd

    Per making changes once you find info like this:
    http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html

    If you create a folder called .elasticbeanstalk at the root of your project and then create a file called myapp.config.

    Setup Apache:

    cp conf/httpd/conf.d/enabledeflate.conf /etc/httpd/conf.d/enabledeflate.conf
    

    Then create enabledeflate.conf with something like this:

    SetOutputFilter DEFLATE
    # mod_deflate configuration
    <IfModule mod_deflate.c>
        # Restrict compression to these MIME types
        AddOutputFilterByType DEFLATE text/plain
        AddOutputFilterByType DEFLATE text/html
        AddOutputFilterByType DEFLATE application/xhtml+xml
        AddOutputFilterByType DEFLATE text/xml
        AddOutputFilterByType DEFLATE application/xml
        AddOutputFilterByType DEFLATE application/xml+rss
        AddOutputFilterByType DEFLATE application/x-javascript
        AddOutputFilterByType DEFLATE text/javascript
        AddOutputFilterByType DEFLATE text/css
        <IfModule mod_headers.c>
            # Make sure proxies don't deliver the wrong content
            Header append Vary User-Agent env=!dont-vary
        </IfModule>
    </IfModule>
    

    A couple of notes:
    You may need to restart apache the first time you deploy this.
    Make sure you put .elasticbeanstalk in the root of your war file (or git repo)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to enable GZIP compression for my static file like css styles, javascript
Can anyone who is using GZip for HTML, JS, PHP and CSS explain how
I want to check if a web page has gzip/deflate compression enabled with php.
I want to enable GZIP compression on my gSOAP client. How can I do
Want to run javascript function from parent window in child window Example I have
I want to send a compressed POST data with Javascript to a server I
Background I'm setting up a generic handler to: Combine & compress Javascript and CSS
I have too many ActionResult in my application and I want add gzip compersion
I'm building a client-server (c#) application that uses a web services to synchronize the
I want to split large, compressed CSV files into multiple smaller gzip file, split

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.