mirror of
https://github.com/searxng/searxng
synced 2024-10-30 21:20:28 +00:00
[mod] Serving static files with uWSGI (searxng.ini)
1. Serving static files with uWSGI by using static file mount points [1]. 2. Expires set to one year since there are hashes [2] [1] https://uwsgi-docs.readthedocs.io/en/latest/StaticFiles.html#mode-3-using-static-file-mount-points [2] https://github.com/searxng/searxng/pull/932 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
5eedd5b72a
commit
8d69ee5e7f
@ -85,5 +85,12 @@ http = ${SEARX_INTERNAL_HTTP}
|
|||||||
#
|
#
|
||||||
# socket = ${SEARX_UWSGI_SOCKET}
|
# socket = ${SEARX_UWSGI_SOCKET}
|
||||||
|
|
||||||
|
# uwsgi serves the static files
|
||||||
|
# expires set to one year since there are hashes
|
||||||
|
static-map = /static=${SEARX_SRC}/searx/static
|
||||||
|
static-expires = /* 31557600
|
||||||
|
static-gzip-all = True
|
||||||
|
offload-threads = %k
|
||||||
|
|
||||||
# Cache
|
# Cache
|
||||||
cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
|
cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
|
||||||
|
@ -83,4 +83,14 @@ pythonpath = ${SEARX_SRC}
|
|||||||
# mkdir -p ${SEARX_UWSGI_SOCKET}
|
# mkdir -p ${SEARX_UWSGI_SOCKET}
|
||||||
# chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
|
# chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
|
||||||
#
|
#
|
||||||
socket = ${SEARX_UWSGI_SOCKET}
|
socket = ${SEARX_UWSGI_SOCKET}
|
||||||
|
|
||||||
|
# uwsgi serves the static files
|
||||||
|
# expires set to one year since there are hashes
|
||||||
|
static-map = /static=${SEARX_SRC}/searx/static
|
||||||
|
static-expires = /* 31557600
|
||||||
|
static-gzip-all = True
|
||||||
|
offload-threads = %k
|
||||||
|
|
||||||
|
# Cache
|
||||||
|
cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
|
||||||
|
@ -84,5 +84,12 @@ http = ${SEARX_INTERNAL_HTTP}
|
|||||||
#
|
#
|
||||||
# socket = ${SEARX_UWSGI_SOCKET}
|
# socket = ${SEARX_UWSGI_SOCKET}
|
||||||
|
|
||||||
|
# uwsgi serves the static files
|
||||||
|
# expires set to one year since there are hashes
|
||||||
|
static-map = /static=${SEARX_SRC}/searx/static
|
||||||
|
static-expires = /* 31557600
|
||||||
|
static-gzip-all = True
|
||||||
|
offload-threads = %k
|
||||||
|
|
||||||
# Cache
|
# Cache
|
||||||
cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
|
cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
|
||||||
|
@ -82,4 +82,14 @@ pythonpath = ${SEARX_SRC}
|
|||||||
# mkdir -p ${SEARX_UWSGI_SOCKET}
|
# mkdir -p ${SEARX_UWSGI_SOCKET}
|
||||||
# chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
|
# chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
|
||||||
#
|
#
|
||||||
socket = ${SEARX_UWSGI_SOCKET}
|
socket = ${SEARX_UWSGI_SOCKET}
|
||||||
|
|
||||||
|
# uwsgi serves the static files
|
||||||
|
# expires set to one year since there are hashes
|
||||||
|
static-map = /static=${SEARX_SRC}/searx/static
|
||||||
|
static-expires = /* 31557600
|
||||||
|
static-gzip-all = True
|
||||||
|
offload-threads = %k
|
||||||
|
|
||||||
|
# Cache
|
||||||
|
cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
|
||||||
|
Loading…
Reference in New Issue
Block a user