Configure nginx in Jelastic

Updated:

Activate nginx compression in Jelastic

Select the config icon in the Load Balancer service/node.

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


WebApp built by Marco using SpringBoot 3.2.4 and Java 21. Hosted in Switzerland (GE8).