on master help sign in
Merge pull request #1623 from ypid/fix/nginx-subdir-hosting

Fix Nginx subdir URL install docs which allowed download of settings.yml

commit2a7855854bd5104eab6dbdd92f6686dc5af5989a authorMarkus Heiser <markus.heiser@darmarIT.de> dateTue 31 Dec 2019, 16:26 (7 years ago) parent754a10c3e5a3ee
1 file changed+15−7
docs/admin/installation.rst+15−7
docs/admin/installation.rst+15−7
@@ -114,6 +114,9 @@ content:
114114 # Module to import
115115 module = searx.webapp
116116
117+ # Support running the module from a webserver subdirectory.
118+ route-run = fixpathinfo:
119+
117120 # Virtualenv and python path
118121 virtualenv = /usr/local/searx/searx-ve/
119122 pythonpath = /usr/local/searx/
@@ -151,7 +154,10 @@ content:
151154 server {
152155 listen 80;
153156 server_name searx.example.com;
154− root /usr/local/searx;
157+ root /usr/local/searx/searx;
158+
159+ location /static {
160+ }
155161
156162 location / {
157163 include uwsgi_params;
@@ -180,14 +186,13 @@ Add this configuration in the server config file
180186
181187.. code:: nginx
182188
183− location = /searx { rewrite ^ /searx/; }
184− location /searx {
185− try_files $uri @searx;
189+ location /searx/static {
190+ alias /usr/local/searx/searx/static;
186191 }
187− location @searx {
192+
193+ location /searx {
188194 uwsgi_param SCRIPT_NAME /searx;
189195 include uwsgi_params;
190− uwsgi_modifier1 30;
191196 uwsgi_pass unix:/run/uwsgi/app/searx/socket;
192197 }
193198
@@ -197,6 +202,10 @@ in case of single-user or low-traffic instances.)
197202
198203.. code:: nginx
199204
205+ location /searx/static {
206+ alias /usr/local/searx/searx/static;
207+ }
208+
200209 location /searx {
201210 proxy_pass http://127.0.0.1:8888;
202211 proxy_set_header Host $host;
@@ -338,4 +347,3 @@ References
338347
339348* How to: `Setup searx in a couple of hours with a free SSL certificate
340349 <https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/>`__
341−