2019-01-05-configure-nginx-jelastic
Use compression with nginx
Activate nginx compression in Jelastic
Select the config icon in the Load Balancer service/node.
<img src="/assets/img/uploads/2019/nginx1.jpg" alt=""/>
<img src="/assets/img/uploads/2019/nginx2.jpg" alt=""/>
Open the file /etc/nginx/nginx-jelastic.conf.
Activate the compression gzip on;
Add the following types to the compression:
gzip_types
text/plain
text/css
text/html
text/javascript
application/javascript
application/x-javascript
application/xml
application/json
application/ld+json;Restart the nginx node;
Redirect all the HTTP requests to HTTPS
in nginx-jelastic.conf search for the following text:
#GFADMIN
server {
listen *:80;
listen [::]:80;
server_name _;and add the line return 301 https://$host$request_uri;
Restart the nginx nodes