Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)

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 Answer

0 votes
by (18.2k points)

You can connect to your EC2 instance even though they are being managed by beanstalk. So, you can actually see where things are located.

Now to enable your gzip of your html/javascript/css, following is what you will have to do:

1. Create a folder called .elasticbeanstalk at the root of your project, then create a file in it called myapp.config.

2. Steup Apache:

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

3. Then you need to create enabledeflate.conf which will look something like:

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>

4. Restart your apache after you deploy this.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

Browse Categories

...