GL-MT3000 nginx issue

Beryl AX comes with nginx-ssl pre-installed as web server
but I would like to configure some reverse proxy option
that is not available there (a stream section in addition to existing http section).

So I removed nginx-ssl with “opkg remove nginx-ssl --force-depends”
and installed the fully featured nginx: “opkg install nginx-all-module”

Now the stream directive that I need is recognized in nginx.conf but the
gzip_static on; is no more accepted.
That is necessary in order to serve gl.inet custom web pages.

I solved uncompressing all the *.gz files in /www
but I hope that in next release the nginx-all-module will be really
full featured and gzip_static supported
Thanks

gzip_static I see in the source code that it is selected. Do you see any errors in the log?

No, i used nginx -t command to check config file. Nginx-ssl says stream directive not recognized, nginx-all-module says gzip_static directive not recognized. Here it is my nginx.conf

user  root;
worker_processes  auto;

pid /var/run/nginx.pid;

events { worker_connections  1024; }

stream
{ # for https reverse proxy
  map_hash_bucket_size 320;
  map $ssl_preread_server_name $name
  {
    abc.zzz.it  abc_backend;
    def.zzz.it   abc_backend;
    ghi.zzz.it   ghi_backend;
    default      ghi_backend;
  }
  upstream abc_backend { server abc.zzz.it:443; }
  upstream ghi_backend { server ghi.zzz.it:443; }

  server
  {
    listen 444;
    proxy_pass $name;   # Pass all requests to the above defined variable container $name
    ssl_preread on;
  }
}

http
{
  include       mime.types;
  default_type  application/octet-stream;

  sendfile on;
  keepalive_timeout 0;

  client_body_buffer_size 10K;
  client_header_buffer_size 1k;
  client_max_body_size 1G;
  large_client_header_buffers 2 1k;

  #gzip_static on;

  root /www;
  
  include /etc/nginx/conf.d/*.conf;
  
  # for http reverse proxy
  server_names_hash_bucket_size 320;
  server
  {
    listen 81 default_server;
    server_name abc.zzz.it;
    location / { proxy_pass http://abc.zzz.it; }
  }
  server
  {
    listen 81;
    server_name ghi.zzz.it;
    location / { proxy_pass http://ghi.zzz.it; }
  }
}

Is nginx-all-module confirmed to be from glinet’s software repository? Check the software source in the /etc/opkg/distfeeds.conf and /etc/opkg/customfeeds.conf file

Used a clean install of fw 4.1.3
distfeeds.conf:
src/gz glinet_core https://fw.gl-inet.com/releases/v21.02.3/kmod-4.0/aarch64_cortex-a53/mediatek/mt7981
src/gz glinet_gli_pub https://fw.gl-inet.com/releases/v21.02.3/packages-4.0/aarch64_cortex-a53/glinet
src/gz glinet_packages https://fw.gl-inet.com/releases/v21.02.3/packages-4.0/aarch64_cortex-a53/packages

customfeeds.conf empty

Ok, I will test and give you feedback.

1 Like

nginx-all-module_1.17.7-2_aarch64_cortex-a53.ipk.zip (983.5 KB)
Please unzip and install the attached ipk file to solve this problem. I opened the gzip_static option in the configuration file and the test results are as follows.

2 Likes

Note: the online update Plug-in:
nginx-all-module 1.19.6-2 does not support gzip_static

has anyone managed to use 1.19.6-2 nginx with latest gl firmwares?

I cannot get to serve the native web gui, it renders luci but not the gli gui so far.