Commit Graph

15 Commits (f204e4903da3e97629bbf37c74e1b603b2e12830)

Author SHA1 Message Date
Alexandre Flament f204e4903d [fix] migration from github.com/asciimoo/searx to github.com/searx/searx : fix URLs 4 years ago
Markus Heiser 26a3a7d523 [docs] installation: add note to update OS before install searx
see: https://github.com/asciimoo/searx/pull/1803#issuecomment-618456661

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser ebde9d10fd docs: proofreading of all the installation topics
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser eb0d4646d8 docs: rework of chapter "Install with apache"
BTW: normalize installation-nginx.rst
4 years ago
Markus Heiser 84daf9999c docs: remove PR #1803 hints
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser cbc08fdc26 docs: describe uwsgi setup of all suported distributions
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser c3e4753ce9 docs: generic documentation from the installation scripts
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 0bfc61dbe9 tooling box: misc fixes from lxc tests
Tested by:

  sudo -H ./utils/lxc.sh build containers
  sudo -H ./utils/lxc.sh cmd /share/searx/utils/searx.sh    install all
  sudo -H ./utils/lxc.sh cmd /share/searx/utils/filtron.sh  install all
  sudo -H ./utils/lxc.sh cmd /share/searx/utils/morty.sh    install all

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser ed4cb4f160 tooling box: varius fix from tests 4 years ago
Markus Heiser eedd63ccd5 docs: revision of the installation instructions
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Markus Heiser 9278f0fb45 docs: add some documentation about the tooling box ./utils/*
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
4 years ago
Robin Schneider 3e5a3ee4e4
Let Nginx deliver static files directory in all examples 5 years ago
Robin Schneider 088337295a
Simply Nginx example by using alias directive for subdirectory URL
We explicitly specific the static directory here using alias to allow to
host from a other subdirectory than "searx" which just so happens to
match the source code directory.
5 years ago
Robin Schneider a1d9c81915
Fix Nginx subdir URL install docs which allowed download of settings.yml
Closes: #1617

There is an issue with the setup example in https://asciimoo.github.io/searx/dev/install/installation.html#installation for subdirectory URL deployments:

```nginx
root /usr/local/searx;

location = /searx { rewrite ^ /searx/; }
        try_files $uri @searx;
}
location @searx {
        uwsgi_param SCRIPT_NAME /searx;
        include uwsgi_params;
        uwsgi_modifier1 30;
        uwsgi_pass unix:/run/uwsgi/app/searx/socket;
}
```

`try_files` causes Nginx to search for files in the server root first. If it matches a file, it is returned. Only if no file matched, the request is passed to uwsgi. The worst consequence I can think of is that  `settings.yml` can be downloaded without authentication (where secrets and configuration details are stored).

To fix this, I propose:

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

location /searx/static {
}

location /searx {
        uwsgi_param SCRIPT_NAME /searx;
        include uwsgi_params;
        uwsgi_pass unix:/run/uwsgi/app/searx/socket;
}
```

And add

```
route-run = fixpathinfo:
```

to `/etc/uwsgi/apps-available/searx.ini` because `uwsgi_modifier1 30` is apparently deprecated. Ref: https://uwsgi-docs.readthedocs.io/en/latest/Changelog-2.0.11.html#fixpathinfo-routing-action

I assume this issue exists because some uwsgi upstream docs also use the `try_files` construct (at least I have seen this somewhere in the docs or somewhere else on the Internet but cannot find it right now again).

https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html#hosting-multiple-apps-in-the-same-process-aka-managing-script-name-and-path-info also warns about this:

> If used incorrectly a configuration like this may cause security problems. For your sanity’s sake, double-triple-quadruple check that your application files, configuration files and any other sensitive files are outside of the root of the static files.
5 years ago
Markus Heiser 04eeeb53a1 doc: moved reST sources in the right folder (much clearer)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
5 years ago