30 lines
1.1 KiB
Django/Jinja
30 lines
1.1 KiB
Django/Jinja
{% extends "core.j2" %}
|
|
|
|
{%block root %}
|
|
root {{ searx_app_dir }}/searx;
|
|
{% endblock %}
|
|
|
|
{% block location %}
|
|
location / {
|
|
{% if item.upstream_name is defined %}
|
|
proxy_pass {{ item.upstream_proto }}://{{ item.upstream_name }}:{{ item.upstream_port }};
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header Connection $http_connection;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Scheme $scheme;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Script-Name {{ searx_app_dir }};
|
|
{% else %}
|
|
include uwsgi_params;
|
|
uwsgi_pass unix://{{ searx_socket }};
|
|
uwsgi_param HTTP_HOST $host;
|
|
#uwsgi_param HTTP_CONNECTION $http_connection;
|
|
uwsgi_param HTTP_CONNECTION '';
|
|
uwsgi_param HTTP_X_SCHEME $scheme;
|
|
#uwsgi_param HTTP_X_SCRIPT_NAME {{ searx_app_dir }};
|
|
uwsgi_param HTTP_X_REAL_IP $remote_addr;
|
|
uwsgi_param HTTP_X_FORWARDED_FOR $proxy_add_x_forwarded_for;
|
|
{% endif %}
|
|
}
|
|
{% endblock %}
|