mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 12:10:11 +01:00
Merge pull request #1623 from ypid/fix/nginx-subdir-hosting
Fix Nginx subdir URL install docs which allowed download of settings.yml
This commit is contained in:
commit
2a7855854b
@ -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/>`__
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user