YunoHost-Apps / searx_ynh

Searx package for YunoHost
https://searx.github.io/searx/
GNU General Public License v3.0
20 stars 17 forks source link

The panel is in global configuration for the domain (nginx.conf) #23

Closed e-jim closed 6 years ago

e-jim commented 6 years ago

Hello, I know #10 #11 sort of force you to move the panel inclusion outside of the location section, but this has two consequences:

1) the floating panel is show everywhere on the domain, even on the home page (tiles) where it doubles the existing logo and on the admin page where it is a pain on mobile. Screenshots as example (disapears if a remove the "include SSOWAT user panel" section) capture d ecran de 2017-12-06 12-07-05 capture d ecran de 2017-12-06 12-08-09

2) it can prevent nginx from loading when searx app is used in conjuction with another app that does the same thing. For example, I installed movim app ( and when I wanted to reload nginx, I got this error:

nginx -t nginx: [emerg] "sub_filter" directive is duplicate in /etc/nginx/conf.d/yunohost_panel.conf.inc:2 nginx: configuration file /etc/nginx/nginx.conf test failed

I already opened a PR at movim to have the panel inclusion part moved, but I don't know what the solution for searx would be, as it doesn't work in either of the location sections.

Thanks for bringing searx to yunohost, by the way!!

maniackcrudelis commented 6 years ago

Hi e-jim

the good news is I can reproduce your error. In fact my searx does the same thing, just I didn't notice that before.

I try to fix my nginx conf, and I finally found that:

location = /searx { rewrite ^ /searx/; }

location /searx {
        if ($scheme = http) {
                rewrite ^ https://$server_name$request_uri? permanent;
        }

        uwsgi_param SCRIPT_NAME '/searx';
        include uwsgi_params;
        uwsgi_modifier1 30;
        uwsgi_pass unix:///run/uwsgi/app/searx/socket;

        include conf.d/yunohost_panel.conf.inc;
}

I just removed try_files $uri @searx; and location @searx, but I'm not sure what's the usage of this location.