summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2019-12-31 16:26:21 +0100
committerGitHub <noreply@github.com>2019-12-31 16:26:21 +0100
commit2a7855854bd5104eab6dbdd92f6686dc5af5989a (patch)
treef3066024e2f65a7a8d88eac3fe8e2296bccdd400
parent754a10c1c1b66195f3ae7542806593d87158a61b (diff)
parent3e5a3ee4e49c739fdc464d47252c684a42620d48 (diff)
downloadsearxng-2a7855854bd5104eab6dbdd92f6686dc5af5989a.tar.gz
searxng-2a7855854bd5104eab6dbdd92f6686dc5af5989a.zip
Merge pull request #1623 from ypid/fix/nginx-subdir-hosting
Fix Nginx subdir URL install docs which allowed download of settings.yml
-rw-r--r--docs/admin/installation.rst22
1 files changed, 15 insertions, 7 deletions
diff --git a/docs/admin/installation.rst b/docs/admin/installation.rst
index 239ce0704..15800fc01 100644
--- a/docs/admin/installation.rst
+++ b/docs/admin/installation.rst
@@ -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/>`__
-