Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 2a785585 authored by Markus Heiser's avatar Markus Heiser Committed by GitHub
Browse files

Merge pull request #1623 from ypid/fix/nginx-subdir-hosting

Fix Nginx subdir URL install docs which allowed download of settings.yml
parents 754a10c1 3e5a3ee4
Loading
Loading
Loading
Loading
+15 −7
Original line number Diff line number Diff line
@@ -114,6 +114,9 @@ content:
    # Module to import
    module = searx.webapp

    # Support running the module from a webserver subdirectory.
    route-run = fixpathinfo:

    # Virtualenv and python path
    virtualenv = /usr/local/searx/searx-ve/
    pythonpath = /usr/local/searx/
@@ -151,7 +154,10 @@ content:
    server {
        listen 80;
        server_name searx.example.com;
        root /usr/local/searx;
        root /usr/local/searx/searx;

        location /static {
        }

        location / {
                include uwsgi_params;
@@ -180,14 +186,13 @@ Add this configuration in the server config file

.. code:: nginx

    location = /searx { rewrite ^ /searx/; }
    location /searx {
            try_files $uri @searx;
    location /searx/static {
            alias /usr/local/searx/searx/static;
    }
    location @searx {

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

@@ -197,6 +202,10 @@ in case of single-user or low-traffic instances.)

.. code:: nginx

    location /searx/static {
            alias /usr/local/searx/searx/static;
    }

    location /searx {
        proxy_pass http://127.0.0.1:8888;
        proxy_set_header Host $host;
@@ -338,4 +347,3 @@ References

* How to: `Setup searx in a couple of hours with a free SSL certificate
  <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__