gh-pages: updated

This commit is contained in:
Markus Heiser 2020-06-19 11:15:15 +02:00
parent 925d1a4911
commit e77ac05b76
88 changed files with 7772 additions and 1819 deletions

View File

@ -325,8 +325,9 @@ Literal blocks
The simplest form of :duref:`literal-blocks` is a indented block introduced by
two colons (``::``). For highlighting use :dudir:`highlight` or :ref:`reST
code` directive. To include literals from external files use directive
:dudir:`literalinclude`.
code` directive. To include literals from external files use
:rst:dir:`literalinclude` or :ref:`kernel-include <kernel-include-directive>`
directive (latter one expands environment variables in the path name).
.. _reST literal:
@ -1312,9 +1313,8 @@ others are basic-tabs_ and code-tabs_. Below a *group-tab* example from
.. literalinclude:: ../admin/buildhosts.rst
:language: reST
:start-after: .. _system requirements:
:end-before: .. _system requirements END:
:start-after: .. SNIP sh lint requirements
:end-before: .. SNAP sh lint requirements
.. _math:

View File

@ -1,31 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.43.0 (0)
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
-->
<!-- Title: foo Pages: 1 -->
<svg width="62pt" height="116pt"
viewBox="0.00 0.00 62.00 116.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 112)">
<title>foo</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-112 58,-112 58,4 -4,4"/>
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-112 58,-112 58,4 -4,4"/>
<!-- bar -->
<g id="node1" class="node">
<title>bar</title>
<ellipse fill="none" stroke="black" cx="27" cy="-90" rx="27" ry="18"/>
<text text-anchor="middle" x="27" y="-86.3" font-family="Times,serif" font-size="14.00">bar</text>
<ellipse fill="none" stroke="#000000" cx="27" cy="-90" rx="27" ry="18"/>
<text text-anchor="middle" x="27" y="-86.3" font-family="Times,serif" font-size="14.00" fill="#000000">bar</text>
</g>
<!-- baz -->
<g id="node2" class="node">
<title>baz</title>
<ellipse fill="none" stroke="black" cx="27" cy="-18" rx="27" ry="18"/>
<text text-anchor="middle" x="27" y="-14.3" font-family="Times,serif" font-size="14.00">baz</text>
<ellipse fill="none" stroke="#000000" cx="27" cy="-18" rx="27" ry="18"/>
<text text-anchor="middle" x="27" y="-14.3" font-family="Times,serif" font-size="14.00" fill="#000000">baz</text>
</g>
<!-- bar&#45;&gt;baz -->
<g id="edge1" class="edge">
<title>bar&#45;&gt;baz</title>
<path fill="none" stroke="black" d="M27,-71.7C27,-63.98 27,-54.71 27,-46.11"/>
<polygon fill="black" stroke="black" points="30.5,-46.1 27,-36.1 23.5,-46.1 30.5,-46.1"/>
<path fill="none" stroke="#000000" d="M27,-71.8314C27,-64.131 27,-54.9743 27,-46.4166"/>
<polygon fill="#000000" stroke="#000000" points="30.5001,-46.4132 27,-36.4133 23.5001,-46.4133 30.5001,-46.4132"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -4,11 +4,11 @@ digraph G {
edge [fontname="Sans"];
browser [label="Browser", shape=Mdiamond];
rp [label="Reverse Proxy", href="url to configure reverse proxy"];
filtron [label="Filtron", href="https://github.com/asciimoo/filtron"];
morty [label="Morty", href="https://github.com/asciimoo/morty"];
rp [label="Reverse Proxy", href="https://asciimoo.github.io/searx/utils/filtron.sh.html#public-reverse-proxy"];
filtron [label="Filtron", href="https://asciimoo.github.io/searx/utils/filtron.sh.html"];
morty [label="Morty", href="https://asciimoo.github.io/searx/utils/morty.sh.html"];
static [label="Static files", href="url to configure static files"];
uwsgi [label="uwsgi", href="url to configure uwsgi"]
uwsgi [label="uwsgi", href="https://asciimoo.github.io/searx/utils/searx.sh.html"]
searx1 [label="Searx #1"];
searx2 [label="Searx #2"];
searx3 [label="Searx #3"];

View File

@ -1,156 +1,156 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.43.0 (0)
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
-->
<!-- Title: G Pages: 1 -->
<svg width="618pt" height="415pt"
viewBox="0.00 0.00 618.00 415.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 411)">
<svg width="618pt" height="529pt"
viewBox="0.00 0.00 618.00 529.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 525)">
<title>G</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-411 614,-411 614,4 -4,4"/>
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-525 614,-525 614,4 -4,4"/>
<g id="clust1" class="cluster">
<title>cluster_searx</title>
<polygon fill="#fafafa" stroke="black" points="8,-8 8,-330 602,-330 602,-8 8,-8"/>
<text text-anchor="middle" x="305" y="-314.8" font-family="Sans" font-size="14.00">Searx instance</text>
<polygon fill="#fafafa" stroke="#000000" points="8,-8 8,-444 602,-444 602,-8 8,-8"/>
<text text-anchor="middle" x="305" y="-428.8" font-family="Sans" font-size="14.00" fill="#000000">Searx instance</text>
</g>
<!-- browser -->
<g id="node1" class="node">
<title>browser</title>
<polygon fill="#ffffcc" stroke="black" points="75,-407 5.29,-389 75,-371 144.71,-389 75,-407"/>
<polyline fill="none" stroke="black" points="16.91,-392 16.91,-386 "/>
<polyline fill="none" stroke="black" points="63.38,-374 86.62,-374 "/>
<polyline fill="none" stroke="black" points="133.09,-386 133.09,-392 "/>
<polyline fill="none" stroke="black" points="86.62,-404 63.38,-404 "/>
<text text-anchor="middle" x="75" y="-385.3" font-family="Sans" font-size="14.00">Browser</text>
<polygon fill="#ffffcc" stroke="#000000" points="75,-521 5.2878,-503 75,-485 144.7122,-503 75,-521"/>
<polyline fill="none" stroke="#000000" points="16.9067,-506.0001 16.9067,-499.9999 "/>
<polyline fill="none" stroke="#000000" points="63.3811,-488.0001 86.6189,-488.0001 "/>
<polyline fill="none" stroke="#000000" points="133.0933,-499.9999 133.0933,-506.0001 "/>
<polyline fill="none" stroke="#000000" points="86.6189,-517.9999 63.3811,-517.9999 "/>
<text text-anchor="middle" x="75" y="-499.3" font-family="Sans" font-size="14.00" fill="#000000">Browser</text>
</g>
<!-- rp -->
<g id="node2" class="node">
<title>rp</title>
<g id="a_node2"><a xlink:href="url to configure reverse proxy" xlink:title="Reverse Proxy">
<polygon fill="#ffffcc" stroke="black" points="134,-299 16,-299 16,-263 134,-263 134,-299"/>
<text text-anchor="middle" x="75" y="-277.3" font-family="Sans" font-size="14.00">Reverse Proxy</text>
<g id="a_node2"><a xlink:href="https://asciimoo.github.io/searx/utils/filtron.sh.html#public-reverse-proxy" xlink:title="Reverse Proxy">
<polygon fill="#ffffcc" stroke="#000000" points="134,-413 16,-413 16,-377 134,-377 134,-413"/>
<text text-anchor="middle" x="75" y="-391.3" font-family="Sans" font-size="14.00" fill="#000000">Reverse Proxy</text>
</a>
</g>
</g>
<!-- browser&#45;&gt;rp -->
<g id="edge1" class="edge">
<title>browser&#45;&gt;rp</title>
<path fill="none" stroke="black" d="M75,-370.97C75,-354.38 75,-328.88 75,-309.43"/>
<polygon fill="black" stroke="black" points="78.5,-309.34 75,-299.34 71.5,-309.34 78.5,-309.34"/>
<text text-anchor="middle" x="98" y="-341.8" font-family="Sans" font-size="14.00">HTTPS</text>
<path fill="none" stroke="#000000" d="M75,-484.6793C75,-467.821 75,-442.5651 75,-423.147"/>
<polygon fill="#000000" stroke="#000000" points="78.5001,-423.0501 75,-413.0502 71.5001,-423.0502 78.5001,-423.0501"/>
<text text-anchor="middle" x="98" y="-455.8" font-family="Sans" font-size="14.00" fill="#000000">HTTPS</text>
</g>
<!-- filtron -->
<g id="node3" class="node">
<title>filtron</title>
<g id="a_node3"><a xlink:href="https://github.com/asciimoo/filtron" xlink:title="Filtron">
<polygon fill="#ffffcc" stroke="black" points="105.5,-212 44.5,-212 44.5,-176 105.5,-176 105.5,-212"/>
<text text-anchor="middle" x="75" y="-190.3" font-family="Sans" font-size="14.00">Filtron</text>
<g id="a_node3"><a xlink:href="https://asciimoo.github.io/searx/utils/filtron.sh.html" xlink:title="Filtron">
<polygon fill="#ffffcc" stroke="#000000" points="105.5,-288 44.5,-288 44.5,-252 105.5,-252 105.5,-288"/>
<text text-anchor="middle" x="75" y="-266.3" font-family="Sans" font-size="14.00" fill="#000000">Filtron</text>
</a>
</g>
</g>
<!-- rp&#45;&gt;filtron -->
<g id="edge4" class="edge">
<title>rp&#45;&gt;filtron</title>
<path fill="none" stroke="black" d="M75,-262.8C75,-251.16 75,-235.55 75,-222.24"/>
<polygon fill="black" stroke="black" points="78.5,-222.18 75,-212.18 71.5,-222.18 78.5,-222.18"/>
<text text-anchor="middle" x="93.5" y="-233.8" font-family="Sans" font-size="14.00">HTTP</text>
<path fill="none" stroke="#000000" d="M75,-376.8239C75,-356.2723 75,-322.5472 75,-298.4893"/>
<polygon fill="#000000" stroke="#000000" points="78.5001,-298.198 75,-288.198 71.5001,-298.198 78.5001,-298.198"/>
<text text-anchor="middle" x="93.5" y="-328.8" font-family="Sans" font-size="14.00" fill="#000000">HTTP</text>
</g>
<!-- morty -->
<g id="node4" class="node">
<title>morty</title>
<g id="a_node4"><a xlink:href="https://github.com/asciimoo/morty" xlink:title="Morty">
<polygon fill="#ffffcc" stroke="black" points="180.5,-212 123.5,-212 123.5,-176 180.5,-176 180.5,-212"/>
<text text-anchor="middle" x="152" y="-190.3" font-family="Sans" font-size="14.00">Morty</text>
<g id="a_node4"><a xlink:href="https://asciimoo.github.io/searx/utils/morty.sh.html" xlink:title="Morty">
<polygon fill="#ffffcc" stroke="#000000" points="180.5,-288 123.5,-288 123.5,-252 180.5,-252 180.5,-288"/>
<text text-anchor="middle" x="152" y="-266.3" font-family="Sans" font-size="14.00" fill="#000000">Morty</text>
</a>
</g>
</g>
<!-- rp&#45;&gt;morty -->
<g id="edge2" class="edge">
<title>rp&#45;&gt;morty</title>
<path fill="none" stroke="black" d="M97.16,-262.75C103.53,-257.36 110.29,-251.2 116,-245 122.81,-237.6 129.47,-228.9 135.18,-220.84"/>
<polygon fill="black" stroke="black" points="138.17,-222.67 140.96,-212.45 132.4,-218.7 138.17,-222.67"/>
<text text-anchor="middle" x="271" y="-233.8" font-family="Sans" font-size="14.00">optional: images and HTML pages proxy</text>
<path fill="none" stroke="#000000" d="M89.8355,-376.705C98.0006,-366.2543 108.0569,-352.7317 116,-340 124.4983,-326.3785 132.7784,-310.5167 139.2508,-297.3397"/>
<polygon fill="#000000" stroke="#000000" points="142.4243,-298.8167 143.6215,-288.2897 136.1209,-295.7724 142.4243,-298.8167"/>
<text text-anchor="middle" x="268" y="-328.8" font-family="Sans" font-size="14.00" fill="#000000">optional: images and HTML pages proxy</text>
</g>
<!-- static -->
<g id="node5" class="node">
<title>static</title>
<g id="a_node5"><a xlink:href="url to configure static files" xlink:title="Static files">
<polygon fill="#ffffcc" stroke="black" points="594,-299 504,-299 504,-263 594,-263 594,-299"/>
<text text-anchor="middle" x="549" y="-277.3" font-family="Sans" font-size="14.00">Static files</text>
<polygon fill="#ffffcc" stroke="#000000" points="594,-413 504,-413 504,-377 594,-377 594,-413"/>
<text text-anchor="middle" x="549" y="-391.3" font-family="Sans" font-size="14.00" fill="#000000">Static files</text>
</a>
</g>
</g>
<!-- rp&#45;&gt;static -->
<g id="edge3" class="edge">
<title>rp&#45;&gt;static</title>
<path fill="none" stroke="black" d="M134.07,-281C226.43,-281 403.75,-281 493.72,-281"/>
<polygon fill="black" stroke="black" points="493.72,-284.5 503.72,-281 493.72,-277.5 493.72,-284.5"/>
<text text-anchor="middle" x="319" y="-287.8" font-family="Sans" font-size="14.00">optional: reverse proxy serves directly static files</text>
<path fill="none" stroke="#000000" d="M134.074,-395C226.433,-395 403.7479,-395 493.718,-395"/>
<polygon fill="#000000" stroke="#000000" points="493.7212,-398.5001 503.7212,-395 493.7211,-391.5001 493.7212,-398.5001"/>
<text text-anchor="middle" x="319" y="-401.8" font-family="Sans" font-size="14.00" fill="#000000">optional: reverse proxy serves directly static files</text>
</g>
<!-- uwsgi -->
<g id="node6" class="node">
<title>uwsgi</title>
<g id="a_node6"><a xlink:href="url to configure uwsgi" xlink:title="uwsgi">
<polygon fill="#ffffcc" stroke="black" points="188,-125 130,-125 130,-89 188,-89 188,-125"/>
<text text-anchor="middle" x="159" y="-103.3" font-family="Sans" font-size="14.00">uwsgi</text>
<g id="a_node6"><a xlink:href="https://asciimoo.github.io/searx/utils/searx.sh.html" xlink:title="uwsgi">
<polygon fill="#ffffcc" stroke="#000000" points="188,-163 130,-163 130,-127 188,-127 188,-163"/>
<text text-anchor="middle" x="159" y="-141.3" font-family="Sans" font-size="14.00" fill="#000000">uwsgi</text>
</a>
</g>
</g>
<!-- filtron&#45;&gt;uwsgi -->
<g id="edge5" class="edge">
<title>filtron&#45;&gt;uwsgi</title>
<path fill="none" stroke="black" d="M92,-175.8C104.3,-163.36 121.09,-146.36 134.78,-132.5"/>
<polygon fill="black" stroke="black" points="137.49,-134.75 142.03,-125.18 132.51,-129.83 137.49,-134.75"/>
<text text-anchor="middle" x="140.5" y="-146.8" font-family="Sans" font-size="14.00">HTTP</text>
<path fill="none" stroke="#000000" d="M87.2143,-251.8239C101.3983,-230.7169 124.9198,-195.7146 141.1515,-171.5603"/>
<polygon fill="#000000" stroke="#000000" points="144.0983,-173.4502 146.7709,-163.198 138.2883,-169.5459 144.0983,-173.4502"/>
<text text-anchor="middle" x="139.5" y="-203.8" font-family="Sans" font-size="14.00" fill="#000000">HTTP</text>
</g>
<!-- searx1 -->
<g id="node7" class="node">
<title>searx1</title>
<polygon fill="#ffffcc" stroke="black" points="99.5,-52 16.5,-52 16.5,-16 99.5,-16 99.5,-52"/>
<text text-anchor="middle" x="58" y="-30.3" font-family="Sans" font-size="14.00">Searx #1</text>
<polygon fill="#ffffcc" stroke="#000000" points="99.5,-52 16.5,-52 16.5,-16 99.5,-16 99.5,-52"/>
<text text-anchor="middle" x="58" y="-30.3" font-family="Sans" font-size="14.00" fill="#000000">Searx #1</text>
</g>
<!-- uwsgi&#45;&gt;searx1 -->
<g id="edge6" class="edge">
<title>uwsgi&#45;&gt;searx1</title>
<path fill="none" stroke="black" d="M134.81,-88.99C121.66,-79.75 105.22,-68.19 90.92,-58.14"/>
<polygon fill="black" stroke="black" points="92.54,-55 82.34,-52.11 88.51,-60.73 92.54,-55"/>
<path fill="none" stroke="#000000" d="M142.3219,-126.6706C125.7281,-108.4339 100.1175,-80.2876 81.4738,-59.7979"/>
<polygon fill="#000000" stroke="#000000" points="84.0217,-57.3975 74.7029,-52.3566 78.8442,-62.1086 84.0217,-57.3975"/>
</g>
<!-- searx2 -->
<g id="node8" class="node">
<title>searx2</title>
<polygon fill="#ffffcc" stroke="black" points="200.5,-52 117.5,-52 117.5,-16 200.5,-16 200.5,-52"/>
<text text-anchor="middle" x="159" y="-30.3" font-family="Sans" font-size="14.00">Searx #2</text>
<polygon fill="#ffffcc" stroke="#000000" points="200.5,-52 117.5,-52 117.5,-16 200.5,-16 200.5,-52"/>
<text text-anchor="middle" x="159" y="-30.3" font-family="Sans" font-size="14.00" fill="#000000">Searx #2</text>
</g>
<!-- uwsgi&#45;&gt;searx2 -->
<g id="edge7" class="edge">
<title>uwsgi&#45;&gt;searx2</title>
<path fill="none" stroke="black" d="M159,-88.81C159,-80.79 159,-71.05 159,-62.07"/>
<polygon fill="black" stroke="black" points="162.5,-62.03 159,-52.03 155.5,-62.03 162.5,-62.03"/>
<path fill="none" stroke="#000000" d="M159,-126.6706C159,-109.2373 159,-82.7482 159,-62.5489"/>
<polygon fill="#000000" stroke="#000000" points="162.5001,-62.3566 159,-52.3566 155.5001,-62.3567 162.5001,-62.3566"/>
</g>
<!-- searx3 -->
<g id="node9" class="node">
<title>searx3</title>
<polygon fill="#ffffcc" stroke="black" points="301.5,-52 218.5,-52 218.5,-16 301.5,-16 301.5,-52"/>
<text text-anchor="middle" x="260" y="-30.3" font-family="Sans" font-size="14.00">Searx #3</text>
<polygon fill="#ffffcc" stroke="#000000" points="301.5,-52 218.5,-52 218.5,-16 301.5,-16 301.5,-52"/>
<text text-anchor="middle" x="260" y="-30.3" font-family="Sans" font-size="14.00" fill="#000000">Searx #3</text>
</g>
<!-- uwsgi&#45;&gt;searx3 -->
<g id="edge8" class="edge">
<title>uwsgi&#45;&gt;searx3</title>
<path fill="none" stroke="black" d="M183.19,-88.99C196.34,-79.75 212.78,-68.19 227.08,-58.14"/>
<polygon fill="black" stroke="black" points="229.49,-60.73 235.66,-52.11 225.46,-55 229.49,-60.73"/>
<path fill="none" stroke="#000000" d="M175.6781,-126.6706C192.2719,-108.4339 217.8825,-80.2876 236.5262,-59.7979"/>
<polygon fill="#000000" stroke="#000000" points="239.1558,-62.1086 243.2971,-52.3566 233.9783,-57.3975 239.1558,-62.1086"/>
</g>
<!-- searx4 -->
<g id="node10" class="node">
<title>searx4</title>
<polygon fill="#ffffcc" stroke="black" points="402.5,-52 319.5,-52 319.5,-16 402.5,-16 402.5,-52"/>
<text text-anchor="middle" x="361" y="-30.3" font-family="Sans" font-size="14.00">Searx #4</text>
<polygon fill="#ffffcc" stroke="#000000" points="402.5,-52 319.5,-52 319.5,-16 402.5,-16 402.5,-52"/>
<text text-anchor="middle" x="361" y="-30.3" font-family="Sans" font-size="14.00" fill="#000000">Searx #4</text>
</g>
<!-- uwsgi&#45;&gt;searx4 -->
<g id="edge9" class="edge">
<title>uwsgi&#45;&gt;searx4</title>
<path fill="none" stroke="black" d="M188.37,-95.68C220.15,-84.51 271.41,-66.49 309.83,-52.98"/>
<polygon fill="black" stroke="black" points="311.03,-56.27 319.31,-49.66 308.71,-49.67 311.03,-56.27"/>
<path fill="none" stroke="#000000" d="M188.3725,-128.8596C222.8149,-109.9334 280.1532,-78.4257 319.2181,-56.9594"/>
<polygon fill="#000000" stroke="#000000" points="321.1614,-59.8852 328.2399,-52.0018 317.7903,-53.7504 321.1614,-59.8852"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -1,30 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.43.0 (0)
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
-->
<!-- Title: G Pages: 1 -->
<svg width="76pt" height="116pt"
viewBox="0.00 0.00 75.59 116.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 112)">
<title>G</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-112 71.59,-112 71.59,4 -4,4"/>
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-112 71.594,-112 71.594,4 -4,4"/>
<!-- Hello -->
<g id="node1" class="node">
<title>Hello</title>
<ellipse fill="none" stroke="black" cx="33.8" cy="-90" rx="30.59" ry="18"/>
<text text-anchor="middle" x="33.8" y="-86.3" font-family="Times,serif" font-size="14.00">Hello</text>
<ellipse fill="none" stroke="#000000" cx="33.797" cy="-90" rx="30.5947" ry="18"/>
<text text-anchor="middle" x="33.797" y="-86.3" font-family="Times,serif" font-size="14.00" fill="#000000">Hello</text>
</g>
<!-- World -->
<g id="node2" class="node">
<title>World</title>
<ellipse fill="none" stroke="black" cx="33.8" cy="-18" rx="33.6" ry="18"/>
<text text-anchor="middle" x="33.8" y="-14.3" font-family="Times,serif" font-size="14.00">World</text>
<ellipse fill="none" stroke="#000000" cx="33.797" cy="-18" rx="33.5952" ry="18"/>
<text text-anchor="middle" x="33.797" y="-14.3" font-family="Times,serif" font-size="14.00" fill="#000000">World</text>
</g>
<!-- Hello&#45;&#45;World -->
<g id="edge1" class="edge">
<title>Hello&#45;&#45;World</title>
<path fill="none" stroke="black" d="M33.8,-71.7C33.8,-60.85 33.8,-46.92 33.8,-36.1"/>
<path fill="none" stroke="#000000" d="M33.797,-71.8314C33.797,-61 33.797,-47.2876 33.797,-36.4133"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,25 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.6.3 -->
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='36.523255pt' height='48.422712pt' viewBox='57.608781 53.798251 36.523255 48.422712'>
<defs>
<path id='g0-0' d='M9.191532 -3.20797C9.428643 -3.20797 9.679701 -3.20797 9.679701 -3.486924S9.428643 -3.765878 9.191532 -3.765878H1.645828C1.408717 -3.765878 1.157659 -3.765878 1.157659 -3.486924S1.408717 -3.20797 1.645828 -3.20797H9.191532Z'/>
<path id='g2-43' d='M5.565131 -3.221918H9.414695C9.609963 -3.221918 9.861021 -3.221918 9.861021 -3.472976C9.861021 -3.737983 9.62391 -3.737983 9.414695 -3.737983H5.565131V-7.587547C5.565131 -7.782814 5.565131 -8.033873 5.314072 -8.033873C5.049066 -8.033873 5.049066 -7.796762 5.049066 -7.587547V-3.737983H1.199502C1.004234 -3.737983 0.753176 -3.737983 0.753176 -3.486924C0.753176 -3.221918 0.990286 -3.221918 1.199502 -3.221918H5.049066V0.627646C5.049066 0.822914 5.049066 1.073973 5.300125 1.073973C5.565131 1.073973 5.565131 0.836862 5.565131 0.627646V-3.221918Z'/>
<path id='g2-49' d='M4.016936 -8.940473C4.016936 -9.26127 4.016936 -9.275218 3.737983 -9.275218C3.403238 -8.89863 2.705853 -8.382565 1.26924 -8.382565V-7.978082C1.590037 -7.978082 2.287422 -7.978082 3.054545 -8.340722V-1.073973C3.054545 -0.571856 3.012702 -0.404483 1.785305 -0.404483H1.352927V0C1.729514 -0.027895 3.082441 -0.027895 3.542715 -0.027895S5.341968 -0.027895 5.718555 0V-0.404483H5.286177C4.05878 -0.404483 4.016936 -0.571856 4.016936 -1.073973V-8.940473Z'/>
<path id='g1-120' d='M6.611208 -5.69066C6.164882 -5.606974 5.997509 -5.272229 5.997509 -5.007223C5.997509 -4.672478 6.262516 -4.560897 6.457783 -4.560897C6.876214 -4.560897 7.169116 -4.923537 7.169116 -5.300125C7.169116 -5.885928 6.499626 -6.150934 5.913823 -6.150934C5.063014 -6.150934 4.588792 -5.314072 4.463263 -5.049066C4.142466 -6.095143 3.277709 -6.150934 3.02665 -6.150934C1.603985 -6.150934 0.850809 -4.323786 0.850809 -4.016936C0.850809 -3.961146 0.9066 -3.891407 1.004234 -3.891407C1.115816 -3.891407 1.143711 -3.975093 1.171606 -4.030884C1.645828 -5.579078 2.580324 -5.87198 2.984807 -5.87198C3.612453 -5.87198 3.737983 -5.286177 3.737983 -4.951432C3.737983 -4.644583 3.654296 -4.323786 3.486924 -3.654296L3.012702 -1.743462C2.803487 -0.9066 2.399004 -0.139477 1.659776 -0.139477C1.590037 -0.139477 1.241345 -0.139477 0.948443 -0.320797C1.45056 -0.418431 1.562142 -0.836862 1.562142 -1.004234C1.562142 -1.283188 1.352927 -1.45056 1.08792 -1.45056C0.753176 -1.45056 0.390535 -1.157659 0.390535 -0.711333C0.390535 -0.125529 1.046077 0.139477 1.645828 0.139477C2.315318 0.139477 2.789539 -0.390535 3.082441 -0.962391C3.305604 -0.139477 4.002989 0.139477 4.519054 0.139477C5.941719 0.139477 6.694894 -1.687671 6.694894 -1.994521C6.694894 -2.064259 6.639103 -2.12005 6.555417 -2.12005C6.429888 -2.12005 6.41594 -2.050311 6.374097 -1.93873C5.997509 -0.711333 5.188543 -0.139477 4.560897 -0.139477C4.072727 -0.139477 3.807721 -0.502117 3.807721 -1.073973C3.807721 -1.380822 3.863512 -1.603985 4.086675 -2.524533L4.574844 -4.42142C4.78406 -5.258281 5.258281 -5.87198 5.899875 -5.87198C5.927771 -5.87198 6.318306 -5.87198 6.611208 -5.69066Z'/>
<path id='g1-121' d='M3.668244 1.562142C3.291656 2.092154 2.747696 2.566376 2.064259 2.566376C1.896887 2.566376 1.227397 2.538481 1.018182 1.896887C1.060025 1.910834 1.129763 1.910834 1.157659 1.910834C1.57609 1.910834 1.855044 1.548194 1.855044 1.227397S1.590037 0.795019 1.380822 0.795019C1.157659 0.795019 0.669489 0.962391 0.669489 1.645828C0.669489 2.357161 1.26924 2.84533 2.064259 2.84533C3.459029 2.84533 4.867746 1.562142 5.258281 0.013948L6.625156 -5.425654C6.639103 -5.495392 6.666999 -5.579078 6.666999 -5.662765C6.666999 -5.87198 6.499626 -6.011457 6.290411 -6.011457C6.164882 -6.011457 5.87198 -5.955666 5.760399 -5.537235L4.728269 -1.436613C4.658531 -1.185554 4.658531 -1.157659 4.546949 -1.004234C4.267995 -0.613699 3.807721 -0.139477 3.138232 -0.139477C2.357161 -0.139477 2.287422 -0.9066 2.287422 -1.283188C2.287422 -2.078207 2.66401 -3.152179 3.040598 -4.156413C3.194022 -4.560897 3.277709 -4.756164 3.277709 -5.035118C3.277709 -5.620922 2.859278 -6.150934 2.175841 -6.150934C0.892653 -6.150934 0.376588 -4.128518 0.376588 -4.016936C0.376588 -3.961146 0.432379 -3.891407 0.530012 -3.891407C0.655542 -3.891407 0.669489 -3.947198 0.72528 -4.142466C1.060025 -5.314072 1.590037 -5.87198 2.133998 -5.87198C2.259527 -5.87198 2.496638 -5.87198 2.496638 -5.411706C2.496638 -5.049066 2.343213 -4.644583 2.133998 -4.11457C1.45056 -2.287422 1.45056 -1.827148 1.45056 -1.492403C1.45056 -0.167372 2.399004 0.139477 3.096389 0.139477C3.500872 0.139477 4.002989 0.013948 4.491158 -0.502117L4.505106 -0.488169C4.29589 0.334745 4.156413 0.878705 3.668244 1.562142Z'/>
<path id='g1-122' d='M1.771357 -1.129763C2.371108 -1.8132 2.859278 -2.245579 3.556663 -2.873225C4.393524 -3.598506 4.756164 -3.947198 4.951432 -4.156413C5.927771 -5.118804 6.41594 -5.927771 6.41594 -6.039352S6.304359 -6.150934 6.276463 -6.150934C6.178829 -6.150934 6.150934 -6.095143 6.081196 -5.997509C5.732503 -5.397758 5.397758 -5.104857 5.035118 -5.104857C4.742217 -5.104857 4.588792 -5.230386 4.323786 -5.565131C4.030884 -5.913823 3.793773 -6.150934 3.38929 -6.150934C2.371108 -6.150934 1.75741 -4.881694 1.75741 -4.588792C1.75741 -4.546949 1.771357 -4.463263 1.896887 -4.463263C2.008468 -4.463263 2.022416 -4.519054 2.064259 -4.616687C2.30137 -5.174595 2.970859 -5.272229 3.235866 -5.272229C3.528767 -5.272229 3.807721 -5.174595 4.100623 -5.049066C4.630635 -4.825903 4.853798 -4.825903 4.993275 -4.825903C5.090909 -4.825903 5.1467 -4.825903 5.216438 -4.839851C4.756164 -4.29589 4.002989 -3.626401 3.375342 -3.054545L1.966625 -1.75741C1.115816 -0.892653 0.599751 -0.069738 0.599751 0.027895C0.599751 0.111582 0.669489 0.139477 0.753176 0.139477S0.850809 0.125529 0.948443 -0.041843C1.171606 -0.390535 1.617933 -0.9066 2.133998 -0.9066C2.426899 -0.9066 2.566376 -0.808966 2.84533 -0.460274C3.110336 -0.153425 3.347447 0.139477 3.793773 0.139477C5.160648 0.139477 5.941719 -1.63188 5.941719 -1.952677C5.941719 -2.008468 5.927771 -2.092154 5.788294 -2.092154C5.676712 -2.092154 5.662765 -2.036364 5.620922 -1.896887C5.314072 -1.073973 4.491158 -0.739228 3.947198 -0.739228C3.654296 -0.739228 3.375342 -0.836862 3.082441 -0.962391C2.524533 -1.185554 2.371108 -1.185554 2.189788 -1.185554C2.050311 -1.185554 1.896887 -1.185554 1.771357 -1.129763Z'/>
</defs>
<g id='page1'>
<use x='59.270442' y='62.786766' xlink:href='#g2-49'/>
<rect x='58.804295' y='68.456606' height='0.55789' width='7.760768'/>
<use x='58.804295' y='81.789907' xlink:href='#g1-120'/>
<use x='70.860038' y='72.222482' xlink:href='#g2-43'/>
<use x='85.942577' y='62.786766' xlink:href='#g2-49'/>
<rect x='85.777106' y='68.456606' height='0.55789' width='7.159416'/>
<use x='85.777106' y='81.789907' xlink:href='#g1-121'/>
<rect x='57.608781' y='86.175621' height='0.55789' width='36.523255'/>
<use x='60.284264' y='99.508922' xlink:href='#g1-121'/>
<use x='70.543155' y='99.508922' xlink:href='#g0-0'/>
<use x='84.490862' y='99.508922' xlink:href='#g1-122'/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -0,0 +1,25 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.6.3 -->
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='23.092891pt' height='29.523663pt' viewBox='57.608781 53.79825 23.092891 29.523663'>
<defs>
<path id='g0-0' d='M6.434044 -2.245569C6.600021 -2.245569 6.775761 -2.245569 6.775761 -2.440836S6.600021 -2.636103 6.434044 -2.636103H1.152075C0.986098 -2.636103 0.810358 -2.636103 0.810358 -2.440836S0.986098 -2.245569 1.152075 -2.245569H6.434044Z'/>
<path id='g2-43' d='M3.993208 -2.245569H6.717181C6.853868 -2.245569 7.039372 -2.245569 7.039372 -2.440836S6.853868 -2.636103 6.717181 -2.636103H3.993208V-5.36984C3.993208 -5.506526 3.993208 -5.69203 3.797941 -5.69203S3.602674 -5.506526 3.602674 -5.36984V-2.636103H0.868938C0.732251 -2.636103 0.546747 -2.636103 0.546747 -2.440836S0.732251 -2.245569 0.868938 -2.245569H3.602674V0.488167C3.602674 0.624854 3.602674 0.810358 3.797941 0.810358S3.993208 0.624854 3.993208 0.488167V-2.245569Z'/>
<path id='g2-49' d='M2.870423 -6.248541C2.870423 -6.482861 2.870423 -6.502388 2.645866 -6.502388C2.040539 -5.877534 1.181365 -5.877534 0.868938 -5.877534V-5.57487C1.064205 -5.57487 1.640242 -5.57487 2.147936 -5.828717V-0.771304C2.147936 -0.419824 2.118646 -0.302664 1.239945 -0.302664H0.927518V0C1.269235 -0.02929 2.118646 -0.02929 2.50918 -0.02929S3.749124 -0.02929 4.090841 0V-0.302664H3.778414C2.899713 -0.302664 2.870423 -0.41006 2.870423 -0.771304V-6.248541Z'/>
<path id='g1-120' d='M3.260957 -2.94853C3.319537 -3.202377 3.544094 -4.100605 4.227528 -4.100605C4.276345 -4.100605 4.510665 -4.100605 4.715696 -3.973681C4.442322 -3.924865 4.247055 -3.680781 4.247055 -3.446461C4.247055 -3.290247 4.354452 -3.104744 4.618062 -3.104744C4.832856 -3.104744 5.145283 -3.280484 5.145283 -3.671018C5.145283 -4.178712 4.569245 -4.315398 4.237292 -4.315398C3.671018 -4.315398 3.329301 -3.797941 3.21214 -3.573384C2.968057 -4.217765 2.440836 -4.315398 2.157699 -4.315398C1.142311 -4.315398 0.585801 -3.055927 0.585801 -2.811843C0.585801 -2.71421 0.683434 -2.71421 0.702961 -2.71421C0.781068 -2.71421 0.810358 -2.733737 0.829884 -2.821607C1.161838 -3.856521 1.806219 -4.100605 2.138172 -4.100605C2.323676 -4.100605 2.665393 -4.012735 2.665393 -3.446461C2.665393 -3.143797 2.499416 -2.489653 2.138172 -1.122785C1.981959 -0.517457 1.640242 -0.107397 1.210655 -0.107397C1.152075 -0.107397 0.927518 -0.107397 0.722488 -0.23432C0.966571 -0.283137 1.181365 -0.488167 1.181365 -0.761541C1.181365 -1.025151 0.966571 -1.103258 0.820121 -1.103258C0.527221 -1.103258 0.283137 -0.849411 0.283137 -0.536984C0.283137 -0.08787 0.771304 0.107397 1.200891 0.107397C1.845272 0.107397 2.196753 -0.576037 2.226043 -0.634617C2.343203 -0.273374 2.694683 0.107397 3.280484 0.107397C4.286108 0.107397 4.842619 -1.152075 4.842619 -1.396158C4.842619 -1.493792 4.754749 -1.493792 4.725459 -1.493792C4.637589 -1.493792 4.618062 -1.454738 4.598535 -1.386395C4.276345 -0.341717 3.612438 -0.107397 3.300011 -0.107397C2.91924 -0.107397 2.763027 -0.419824 2.763027 -0.751778C2.763027 -0.966571 2.821607 -1.181365 2.929003 -1.610952L3.260957 -2.94853Z'/>
<path id='g1-121' d='M4.744986 -3.719834C4.784039 -3.856521 4.784039 -3.876048 4.784039 -3.944391C4.784039 -4.120131 4.647352 -4.208002 4.500902 -4.208002C4.403268 -4.208002 4.247055 -4.149422 4.159185 -4.002971C4.139658 -3.954155 4.061551 -3.651491 4.022498 -3.475751C3.954155 -3.221904 3.885811 -2.958293 3.827231 -2.694683L3.387881 -0.937281C3.348827 -0.790831 2.929003 -0.107397 2.284623 -0.107397C1.786692 -0.107397 1.679295 -0.536984 1.679295 -0.898228C1.679295 -1.347342 1.845272 -1.952669 2.177226 -2.811843C2.333439 -3.21214 2.372493 -3.319537 2.372493 -3.514804C2.372493 -3.954155 2.060066 -4.315398 1.571899 -4.315398C0.644381 -4.315398 0.283137 -2.899713 0.283137 -2.811843C0.283137 -2.71421 0.38077 -2.71421 0.400297 -2.71421C0.497931 -2.71421 0.507694 -2.733737 0.556511 -2.88995C0.820121 -3.807704 1.210655 -4.100605 1.542608 -4.100605C1.620715 -4.100605 1.786692 -4.100605 1.786692 -3.788178C1.786692 -3.544094 1.689059 -3.290247 1.620715 -3.104744C1.230181 -2.069829 1.054441 -1.513318 1.054441 -1.054441C1.054441 -0.185504 1.669532 0.107397 2.245569 0.107397C2.62634 0.107397 2.958293 -0.05858 3.231667 -0.331954C3.104744 0.17574 2.987583 0.654144 2.59705 1.171601C2.343203 1.503555 1.972196 1.786692 1.523082 1.786692C1.386395 1.786692 0.947044 1.757402 0.781068 1.376632C0.937281 1.376632 1.064205 1.376632 1.200891 1.259471C1.298525 1.171601 1.396158 1.044678 1.396158 0.859174C1.396158 0.556511 1.132548 0.517457 1.034915 0.517457C0.810358 0.517457 0.488167 0.673671 0.488167 1.152075C0.488167 1.640242 0.917754 2.001486 1.523082 2.001486C2.528706 2.001486 3.534331 1.113021 3.807704 0.009763L4.744986 -3.719834Z'/>
<path id='g1-122' d='M1.298525 -0.810358C1.825745 -1.376632 2.108882 -1.620715 2.460363 -1.923379C2.460363 -1.933142 3.06569 -2.4506 3.417171 -2.80208C4.344688 -3.710071 4.559482 -4.178712 4.559482 -4.217765C4.559482 -4.315398 4.471612 -4.315398 4.452085 -4.315398C4.383742 -4.315398 4.354452 -4.295872 4.305635 -4.208002C4.012735 -3.739361 3.807704 -3.583148 3.573384 -3.583148S3.221904 -3.729598 3.075454 -3.895575C2.88995 -4.120131 2.723973 -4.315398 2.401783 -4.315398C1.669532 -4.315398 1.220418 -3.407407 1.220418 -3.202377C1.220418 -3.15356 1.249708 -3.09498 1.337578 -3.09498S1.444975 -3.143797 1.464502 -3.202377C1.650005 -3.651491 2.216279 -3.661254 2.294386 -3.661254C2.499416 -3.661254 2.68492 -3.592911 2.909477 -3.514804C3.300011 -3.368354 3.407407 -3.368354 3.661254 -3.368354C3.309774 -2.94853 2.489653 -2.245569 2.304149 -2.089356L1.425448 -1.269235C0.761541 -0.615091 0.419824 -0.05858 0.419824 0.009763C0.419824 0.107397 0.517457 0.107397 0.536984 0.107397C0.615091 0.107397 0.634617 0.08787 0.693197 -0.019527C0.917754 -0.361244 1.210655 -0.624854 1.523082 -0.624854C1.747639 -0.624854 1.845272 -0.536984 2.089356 -0.253847C2.255333 -0.048817 2.431073 0.107397 2.71421 0.107397C3.680781 0.107397 4.247055 -1.132548 4.247055 -1.396158C4.247055 -1.444975 4.208002 -1.493792 4.129895 -1.493792C4.042025 -1.493792 4.022498 -1.435212 3.993208 -1.366868C3.768651 -0.732251 3.143797 -0.546747 2.821607 -0.546747C2.62634 -0.546747 2.4506 -0.605327 2.245569 -0.673671C1.913616 -0.800594 1.767165 -0.839648 1.562135 -0.839648C1.542608 -0.839648 1.386395 -0.839648 1.298525 -0.810358Z'/>
</defs>
<g id='page1'>
<use x='59.153464' y='60.090183' xlink:href='#g2-49'/>
<rect x='58.804295' y='61.81595' height='0.55789' width='5.580027'/>
<use x='58.804295' y='70.391549' xlink:href='#g1-120'/>
<use x='65.579836' y='65.581827' xlink:href='#g2-43'/>
<use x='74.496784' y='60.090183' xlink:href='#g2-49'/>
<rect x='74.369089' y='61.81595' height='0.55789' width='5.137078'/>
<use x='74.369089' y='70.391549' xlink:href='#g1-121'/>
<rect x='57.608781' y='72.847884' height='0.55789' width='23.092891'/>
<use x='60.304908' y='81.423483' xlink:href='#g1-121'/>
<use x='65.441996' y='81.423483' xlink:href='#g0-0'/>
<use x='73.035735' y='81.423483' xlink:href='#g1-122'/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@ -0,0 +1,22 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.6.3 -->
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='69.686469pt' height='12.418845pt' viewBox='56.413267 54.399982 69.686469 12.418845'>
<defs>
<path id='g2-43' d='M5.565131 -3.221918H9.414695C9.609963 -3.221918 9.861021 -3.221918 9.861021 -3.472976C9.861021 -3.737983 9.62391 -3.737983 9.414695 -3.737983H5.565131V-7.587547C5.565131 -7.782814 5.565131 -8.033873 5.314072 -8.033873C5.049066 -8.033873 5.049066 -7.796762 5.049066 -7.587547V-3.737983H1.199502C1.004234 -3.737983 0.753176 -3.737983 0.753176 -3.486924C0.753176 -3.221918 0.990286 -3.221918 1.199502 -3.221918H5.049066V0.627646C5.049066 0.822914 5.049066 1.073973 5.300125 1.073973C5.565131 1.073973 5.565131 0.836862 5.565131 0.627646V-3.221918Z'/>
<path id='g2-61' d='M9.414695 -4.519054C9.609963 -4.519054 9.861021 -4.519054 9.861021 -4.770112C9.861021 -5.035118 9.62391 -5.035118 9.414695 -5.035118H1.199502C1.004234 -5.035118 0.753176 -5.035118 0.753176 -4.78406C0.753176 -4.519054 0.990286 -4.519054 1.199502 -4.519054H9.414695ZM9.414695 -1.924782C9.609963 -1.924782 9.861021 -1.924782 9.861021 -2.175841C9.861021 -2.440847 9.62391 -2.440847 9.414695 -2.440847H1.199502C1.004234 -2.440847 0.753176 -2.440847 0.753176 -2.189788C0.753176 -1.924782 0.990286 -1.924782 1.199502 -1.924782H9.414695Z'/>
<path id='g0-97' d='M4.198257 -1.659776C4.128518 -1.422665 4.128518 -1.39477 3.93325 -1.129763C3.626401 -0.739228 3.012702 -0.139477 2.357161 -0.139477C1.785305 -0.139477 1.464508 -0.655542 1.464508 -1.478456C1.464508 -2.245579 1.896887 -3.807721 2.161893 -4.393524C2.636115 -5.369863 3.291656 -5.87198 3.835616 -5.87198C4.756164 -5.87198 4.937484 -4.728269 4.937484 -4.616687C4.937484 -4.60274 4.895641 -4.42142 4.881694 -4.393524L4.198257 -1.659776ZM5.090909 -5.230386C4.937484 -5.593026 4.560897 -6.150934 3.835616 -6.150934C2.259527 -6.150934 0.557908 -4.11457 0.557908 -2.050311C0.557908 -0.669489 1.366874 0.139477 2.315318 0.139477C3.082441 0.139477 3.737983 -0.460274 4.128518 -0.920548C4.267995 -0.097634 4.923537 0.139477 5.341968 0.139477S6.095143 -0.111582 6.346202 -0.613699C6.569365 -1.08792 6.764633 -1.93873 6.764633 -1.994521C6.764633 -2.064259 6.708842 -2.12005 6.625156 -2.12005C6.499626 -2.12005 6.485679 -2.050311 6.429888 -1.841096C6.220672 -1.018182 5.955666 -0.139477 5.383811 -0.139477C4.979328 -0.139477 4.951432 -0.502117 4.951432 -0.781071C4.951432 -1.101868 4.993275 -1.255293 5.118804 -1.799253C5.216438 -2.147945 5.286177 -2.454795 5.397758 -2.859278C5.913823 -4.951432 6.039352 -5.453549 6.039352 -5.537235C6.039352 -5.732503 5.885928 -5.885928 5.676712 -5.885928C5.230386 -5.885928 5.118804 -5.397758 5.090909 -5.230386Z'/>
<path id='g0-98' d='M3.221918 -9.331009C3.235866 -9.3868 3.263761 -9.470486 3.263761 -9.540224C3.263761 -9.679701 3.124284 -9.679701 3.096389 -9.679701C3.082441 -9.679701 2.580324 -9.637858 2.329265 -9.609963C2.092154 -9.596015 1.882939 -9.56812 1.63188 -9.554172C1.297136 -9.526276 1.199502 -9.512329 1.199502 -9.26127C1.199502 -9.121793 1.338979 -9.121793 1.478456 -9.121793C2.189788 -9.121793 2.189788 -8.996264 2.189788 -8.856787C2.189788 -8.759153 2.078207 -8.35467 2.022416 -8.103611L1.687671 -6.764633C1.548194 -6.206725 0.753176 -3.040598 0.697385 -2.789539C0.627646 -2.440847 0.627646 -2.203736 0.627646 -2.022416C0.627646 -0.599751 1.422665 0.139477 2.329265 0.139477C3.947198 0.139477 5.620922 -1.93873 5.620922 -3.961146C5.620922 -5.244334 4.895641 -6.150934 3.849564 -6.150934C3.124284 -6.150934 2.468742 -5.551183 2.203736 -5.272229L3.221918 -9.331009ZM2.343213 -0.139477C1.896887 -0.139477 1.408717 -0.474222 1.408717 -1.562142C1.408717 -2.022416 1.45056 -2.287422 1.701619 -3.263761C1.743462 -3.445081 1.966625 -4.337733 2.022416 -4.519054C2.050311 -4.630635 2.873225 -5.87198 3.821669 -5.87198C4.435367 -5.87198 4.714321 -5.258281 4.714321 -4.533001C4.714321 -3.863512 4.323786 -2.287422 3.975093 -1.562142C3.626401 -0.808966 2.984807 -0.139477 2.343213 -0.139477Z'/>
<path id='g0-99' d='M5.453549 -5.244334C5.188543 -5.244334 5.063014 -5.244334 4.867746 -5.076961C4.78406 -5.007223 4.630635 -4.798007 4.630635 -4.574844C4.630635 -4.29589 4.839851 -4.128518 5.104857 -4.128518C5.439601 -4.128518 5.816189 -4.407472 5.816189 -4.96538C5.816189 -5.634869 5.174595 -6.150934 4.212204 -6.150934C2.385056 -6.150934 0.557908 -4.156413 0.557908 -2.175841C0.557908 -0.962391 1.311083 0.139477 2.733748 0.139477C4.630635 0.139477 5.830137 -1.338979 5.830137 -1.520299C5.830137 -1.603985 5.746451 -1.673724 5.69066 -1.673724C5.648817 -1.673724 5.634869 -1.659776 5.50934 -1.534247C4.616687 -0.348692 3.291656 -0.139477 2.761644 -0.139477C1.799253 -0.139477 1.492403 -0.976339 1.492403 -1.673724C1.492403 -2.161893 1.729514 -3.514819 2.231631 -4.463263C2.594271 -5.118804 3.347447 -5.87198 4.226152 -5.87198C4.407472 -5.87198 5.174595 -5.844085 5.453549 -5.244334Z'/>
<path id='g1-50' d='M1.239945 -0.751778L2.274859 -1.757402C3.797941 -3.104744 4.383742 -3.631964 4.383742 -4.608299C4.383742 -5.72132 3.505041 -6.502388 2.313913 -6.502388C1.210655 -6.502388 0.488167 -5.60416 0.488167 -4.735222C0.488167 -4.188475 0.976334 -4.188475 1.005625 -4.188475C1.171601 -4.188475 1.513318 -4.305635 1.513318 -4.705932C1.513318 -4.959779 1.337578 -5.213626 0.995861 -5.213626C0.917754 -5.213626 0.898228 -5.213626 0.868938 -5.203863C1.093495 -5.83848 1.620715 -6.199724 2.186989 -6.199724C3.075454 -6.199724 3.495277 -5.408893 3.495277 -4.608299C3.495277 -3.827231 3.00711 -3.055927 2.470126 -2.4506L0.595564 -0.361244C0.488167 -0.253847 0.488167 -0.23432 0.488167 0H4.110368L4.383742 -1.698822H4.139658C4.090841 -1.405922 4.022498 -0.976334 3.924865 -0.829884C3.856521 -0.751778 3.21214 -0.751778 2.997347 -0.751778H1.239945Z'/>
</defs>
<g id='page1'>
<use x='56.413267' y='65.753425' xlink:href='#g0-97'/>
<use x='63.582369' y='60.691915' xlink:href='#g1-50'/>
<use x='72.061649' y='65.753425' xlink:href='#g2-43'/>
<use x='85.783204' y='65.753425' xlink:href='#g0-98'/>
<use x='91.589827' y='60.691915' xlink:href='#g1-50'/>
<use x='100.843973' y='65.753425' xlink:href='#g2-61'/>
<use x='115.340392' y='65.753425' xlink:href='#g0-99'/>
<use x='121.218045' y='60.691915' xlink:href='#g1-50'/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,43 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- This file was generated by dvisvgm 2.6.3 -->
<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='134.289458pt' height='28.68903pt' viewBox='165.981071 78.308016 134.289458 28.68903'>
<defs>
<path id='g2-32' d='M6.555417 -9.344956C6.555417 -9.358904 6.611208 -9.540224 6.611208 -9.554172C6.611208 -9.679701 6.499626 -9.679701 6.457783 -9.679701C6.332254 -9.679701 6.318306 -9.609963 6.262516 -9.400747L3.961146 -0.167372C2.803487 -0.306849 2.371108 -0.892653 2.371108 -1.729514C2.371108 -2.036364 2.371108 -2.357161 3.02665 -4.086675C3.20797 -4.588792 3.277709 -4.770112 3.277709 -5.021171C3.277709 -5.648817 2.831382 -6.150934 2.175841 -6.150934C0.892653 -6.150934 0.376588 -4.128518 0.376588 -4.016936C0.376588 -3.961146 0.432379 -3.891407 0.530012 -3.891407C0.655542 -3.891407 0.669489 -3.947198 0.72528 -4.142466C1.060025 -5.355915 1.617933 -5.87198 2.133998 -5.87198C2.259527 -5.87198 2.496638 -5.858032 2.496638 -5.411706C2.496638 -5.355915 2.496638 -5.049066 2.259527 -4.435367C1.506351 -2.454795 1.506351 -2.147945 1.506351 -1.827148C1.506351 -0.488169 2.622167 0.027895 3.87746 0.125529C3.765878 0.557908 3.668244 1.004234 3.556663 1.436613C3.333499 2.273474 3.235866 2.66401 3.235866 2.719801C3.235866 2.84533 3.347447 2.84533 3.38929 2.84533C3.417186 2.84533 3.472976 2.84533 3.500872 2.789539C3.556663 2.733748 4.128518 0.390535 4.184309 0.139477C4.700374 0.139477 5.802242 0.139477 7.057534 -1.157659C7.517808 -1.659776 7.936239 -2.30137 8.17335 -2.901121C8.312827 -3.263761 8.647572 -4.505106 8.647572 -5.216438C8.647572 -6.0533 8.229141 -6.150934 8.089664 -6.150934C7.754919 -6.150934 7.44807 -5.816189 7.44807 -5.537235C7.44807 -5.369863 7.545704 -5.272229 7.601494 -5.216438C7.727024 -5.090909 8.103611 -4.714321 8.103611 -3.989041C8.103611 -3.486924 7.824658 -2.454795 6.932005 -1.45056C5.760399 -0.139477 4.686426 -0.139477 4.267995 -0.139477L6.555417 -9.344956Z'/>
<path id='g2-58' d='M2.566376 -0.669489C2.566376 -1.073973 2.231631 -1.352927 1.896887 -1.352927C1.492403 -1.352927 1.21345 -1.018182 1.21345 -0.683437C1.21345 -0.278954 1.548194 0 1.882939 0C2.287422 0 2.566376 -0.334745 2.566376 -0.669489Z'/>
<path id='g2-64' d='M6.332254 -4.658531C6.248568 -5.439601 5.760399 -6.374097 4.505106 -6.374097C2.538481 -6.374097 0.530012 -4.379577 0.530012 -2.161893C0.530012 -1.311083 1.115816 0.292902 3.012702 0.292902C6.304359 0.292902 7.713076 -4.505106 7.713076 -6.41594C7.713076 -8.424408 6.583313 -9.972603 4.798007 -9.972603C2.775592 -9.972603 2.175841 -8.201245 2.175841 -7.824658C2.175841 -7.699128 2.259527 -7.392279 2.650062 -7.392279C3.138232 -7.392279 3.347447 -7.838605 3.347447 -8.075716C3.347447 -8.508095 2.915068 -8.508095 2.733748 -8.508095C3.305604 -9.540224 4.365629 -9.637858 4.742217 -9.637858C5.969614 -9.637858 6.750685 -8.661519 6.750685 -7.099377C6.750685 -6.206725 6.485679 -5.174595 6.346202 -4.658531H6.332254ZM3.054545 -0.083686C1.743462 -0.083686 1.520299 -1.115816 1.520299 -1.701619C1.520299 -2.315318 1.910834 -3.75193 2.12005 -4.267995C2.30137 -4.686426 3.096389 -6.095143 4.546949 -6.095143C5.816189 -6.095143 6.109091 -4.993275 6.109091 -4.2401C6.109091 -3.20797 5.202491 -0.083686 3.054545 -0.083686Z'/>
<path id='g2-72' d='M10.432877 -8.508095C10.558406 -8.982316 10.586301 -9.121793 11.576588 -9.121793C11.827646 -9.121793 11.967123 -9.121793 11.967123 -9.372852C11.967123 -9.526276 11.841594 -9.526276 11.757908 -9.526276C11.506849 -9.526276 11.213948 -9.498381 10.948941 -9.498381H9.303113C9.038107 -9.498381 8.745205 -9.526276 8.480199 -9.526276C8.382565 -9.526276 8.215193 -9.526276 8.215193 -9.26127C8.215193 -9.121793 8.312827 -9.121793 8.577833 -9.121793C9.414695 -9.121793 9.414695 -9.010212 9.414695 -8.856787C9.414695 -8.828892 9.414695 -8.745205 9.358904 -8.53599L8.508095 -5.160648H4.29589L5.132752 -8.508095C5.258281 -8.982316 5.286177 -9.121793 6.276463 -9.121793C6.527522 -9.121793 6.666999 -9.121793 6.666999 -9.372852C6.666999 -9.526276 6.541469 -9.526276 6.457783 -9.526276C6.206725 -9.526276 5.913823 -9.498381 5.648817 -9.498381H4.002989C3.737983 -9.498381 3.445081 -9.526276 3.180075 -9.526276C3.082441 -9.526276 2.915068 -9.526276 2.915068 -9.26127C2.915068 -9.121793 3.012702 -9.121793 3.277709 -9.121793C4.11457 -9.121793 4.11457 -9.010212 4.11457 -8.856787C4.11457 -8.828892 4.11457 -8.745205 4.05878 -8.53599L2.175841 -1.03213C2.050311 -0.54396 2.022416 -0.404483 1.060025 -0.404483C0.739228 -0.404483 0.641594 -0.404483 0.641594 -0.139477C0.641594 0 0.795019 0 0.836862 0C1.08792 0 1.380822 -0.027895 1.645828 -0.027895H3.291656C3.556663 -0.027895 3.849564 0 4.11457 0C4.226152 0 4.379577 0 4.379577 -0.265006C4.379577 -0.404483 4.254047 -0.404483 4.044832 -0.404483C3.194022 -0.404483 3.194022 -0.516065 3.194022 -0.655542C3.194022 -0.669489 3.194022 -0.767123 3.221918 -0.878705L4.184309 -4.756164H8.410461C8.17335 -3.835616 7.462017 -0.920548 7.434122 -0.836862C7.280697 -0.418431 7.057534 -0.418431 6.23462 -0.404483C6.067248 -0.404483 5.941719 -0.404483 5.941719 -0.139477C5.941719 0 6.095143 0 6.136986 0C6.388045 0 6.680946 -0.027895 6.945953 -0.027895H8.591781C8.856787 -0.027895 9.149689 0 9.414695 0C9.526276 0 9.679701 0 9.679701 -0.265006C9.679701 -0.404483 9.554172 -0.404483 9.344956 -0.404483C8.494147 -0.404483 8.494147 -0.516065 8.494147 -0.655542C8.494147 -0.669489 8.494147 -0.767123 8.522042 -0.878705L10.432877 -8.508095Z'/>
<path id='g2-116' d='M2.803487 -5.606974H4.086675C4.351681 -5.606974 4.491158 -5.606974 4.491158 -5.858032C4.491158 -6.011457 4.407472 -6.011457 4.128518 -6.011457H2.901121L3.417186 -8.047821C3.472976 -8.243088 3.472976 -8.270984 3.472976 -8.368618C3.472976 -8.591781 3.291656 -8.71731 3.110336 -8.71731C2.998755 -8.71731 2.677958 -8.675467 2.566376 -8.229141L2.022416 -6.011457H0.711333C0.432379 -6.011457 0.306849 -6.011457 0.306849 -5.746451C0.306849 -5.606974 0.404483 -5.606974 0.669489 -5.606974H1.910834L0.990286 -1.924782C0.878705 -1.436613 0.836862 -1.297136 0.836862 -1.115816C0.836862 -0.460274 1.297136 0.139477 2.078207 0.139477C3.486924 0.139477 4.2401 -1.896887 4.2401 -1.994521C4.2401 -2.078207 4.184309 -2.12005 4.100623 -2.12005C4.072727 -2.12005 4.016936 -2.12005 3.989041 -2.064259C3.975093 -2.050311 3.961146 -2.036364 3.863512 -1.8132C3.57061 -1.115816 2.929016 -0.139477 2.12005 -0.139477C1.701619 -0.139477 1.673724 -0.488169 1.673724 -0.795019C1.673724 -0.808966 1.673724 -1.073973 1.715567 -1.241345L2.803487 -5.606974Z'/>
<path id='g1-105' d='M3.807721 -3.249813C3.87746 -3.417186 3.87746 -3.445081 3.87746 -3.486924S3.87746 -3.556663 3.807721 -3.724035L1.366874 -10.139975C1.283188 -10.377086 1.199502 -10.460772 1.046077 -10.460772S0.767123 -10.335243 0.767123 -10.181818C0.767123 -10.139975 0.767123 -10.11208 0.836862 -9.958655L3.305604 -3.486924L0.836862 2.956912C0.767123 3.110336 0.767123 3.138232 0.767123 3.20797C0.767123 3.361395 0.892653 3.486924 1.046077 3.486924C1.227397 3.486924 1.283188 3.347447 1.338979 3.20797L3.807721 -3.249813Z'/>
<path id='g1-106' d='M2.217684 -9.958655C2.217684 -10.209714 2.217684 -10.460772 1.93873 -10.460772S1.659776 -10.209714 1.659776 -9.958655V2.984807C1.659776 3.235866 1.659776 3.486924 1.93873 3.486924S2.217684 3.235866 2.217684 2.984807V-9.958655Z'/>
<path id='g3-40' d='M4.533001 3.38929C4.533001 3.347447 4.533001 3.319552 4.29589 3.082441C2.901121 1.673724 2.12005 -0.627646 2.12005 -3.472976C2.12005 -6.178829 2.775592 -8.508095 4.393524 -10.153923C4.533001 -10.279452 4.533001 -10.307347 4.533001 -10.349191C4.533001 -10.432877 4.463263 -10.460772 4.407472 -10.460772C4.226152 -10.460772 3.082441 -9.456538 2.399004 -8.089664C1.687671 -6.680946 1.366874 -5.188543 1.366874 -3.472976C1.366874 -2.231631 1.562142 -0.571856 2.287422 0.920548C3.110336 2.594271 4.254047 3.500872 4.407472 3.500872C4.463263 3.500872 4.533001 3.472976 4.533001 3.38929Z'/>
<path id='g3-41' d='M3.93325 -3.472976C3.93325 -4.533001 3.793773 -6.262516 3.012702 -7.880448C2.189788 -9.554172 1.046077 -10.460772 0.892653 -10.460772C0.836862 -10.460772 0.767123 -10.432877 0.767123 -10.349191C0.767123 -10.307347 0.767123 -10.279452 1.004234 -10.042341C2.399004 -8.633624 3.180075 -6.332254 3.180075 -3.486924C3.180075 -0.781071 2.524533 1.548194 0.9066 3.194022C0.767123 3.319552 0.767123 3.347447 0.767123 3.38929C0.767123 3.472976 0.836862 3.500872 0.892653 3.500872C1.073973 3.500872 2.217684 2.496638 2.901121 1.129763C3.612453 -0.292902 3.93325 -1.799253 3.93325 -3.472976Z'/>
<path id='g3-61' d='M9.414695 -4.519054C9.609963 -4.519054 9.861021 -4.519054 9.861021 -4.770112C9.861021 -5.035118 9.62391 -5.035118 9.414695 -5.035118H1.199502C1.004234 -5.035118 0.753176 -5.035118 0.753176 -4.78406C0.753176 -4.519054 0.990286 -4.519054 1.199502 -4.519054H9.414695ZM9.414695 -1.924782C9.609963 -1.924782 9.861021 -1.924782 9.861021 -2.175841C9.861021 -2.440847 9.62391 -2.440847 9.414695 -2.440847H1.199502C1.004234 -2.440847 0.753176 -2.440847 0.753176 -2.189788C0.753176 -1.924782 0.990286 -1.924782 1.199502 -1.924782H9.414695Z'/>
<path id='g3-94' d='M3.417186 -9.679701L1.590037 -7.782814L1.8132 -7.573599L3.403238 -9.010212L5.007223 -7.573599L5.230386 -7.782814L3.417186 -9.679701Z'/>
<path id='g3-105' d='M2.426899 -8.591781C2.426899 -8.954421 2.133998 -9.275218 1.743462 -9.275218C1.380822 -9.275218 1.073973 -8.982316 1.073973 -8.605729C1.073973 -8.187298 1.408717 -7.922291 1.743462 -7.922291C2.175841 -7.922291 2.426899 -8.284932 2.426899 -8.591781ZM0.502117 -5.997509V-5.593026C1.39477 -5.593026 1.520299 -5.50934 1.520299 -4.825903V-1.03213C1.520299 -0.404483 1.366874 -0.404483 0.460274 -0.404483V0C0.850809 -0.027895 1.520299 -0.027895 1.924782 -0.027895C2.078207 -0.027895 2.887173 -0.027895 3.361395 0V-0.404483C2.454795 -0.404483 2.399004 -0.474222 2.399004 -1.018182V-6.150934L0.502117 -5.997509Z'/>
<path id='g0-126' d='M3.556663 -7.671233H6.262516C6.499626 -7.671233 6.653051 -7.671233 6.653051 -7.838605C6.653051 -8.019925 6.485679 -8.019925 6.220672 -8.019925H3.640349C3.737983 -8.368618 3.737983 -8.396513 3.821669 -8.745205C3.891407 -8.996264 4.016936 -9.484433 4.016936 -9.512329C4.016936 -9.637858 3.93325 -9.679701 3.821669 -9.679701C3.556663 -9.679701 2.454795 -9.56812 2.12005 -9.540224C2.008468 -9.526276 1.855044 -9.512329 1.855044 -9.247323C1.855044 -9.093898 1.994521 -9.093898 2.189788 -9.093898C2.859278 -9.093898 2.887173 -8.996264 2.887173 -8.856787C2.887173 -8.759153 2.761644 -8.298879 2.691905 -8.019925H1.910834C1.63188 -8.019925 1.478456 -8.019925 1.478456 -7.838605C1.478456 -7.671233 1.603985 -7.671233 1.868991 -7.671233H2.608219L0.822914 -0.557908C0.767123 -0.348692 0.767123 -0.320797 0.767123 -0.237111C0.767123 0.069738 1.004234 0.153425 1.171606 0.153425C1.436613 0.153425 1.63188 -0.041843 1.687671 -0.223163C1.715567 -0.292902 1.868991 -0.920548 1.952677 -1.26924L2.273474 -2.510585C2.315318 -2.719801 2.454795 -3.249813 2.496638 -3.459029C2.566376 -3.682192 2.66401 -4.11457 2.677958 -4.156413C2.789539 -4.393524 3.542715 -5.858032 4.937484 -5.858032C5.551183 -5.858032 5.69066 -5.355915 5.69066 -4.895641C5.69066 -4.030884 5.049066 -2.329265 4.798007 -1.687671C4.714321 -1.464508 4.644583 -1.26924 4.644583 -1.004234C4.644583 -0.278954 5.160648 0.153425 5.788294 0.153425C7.127273 0.153425 7.615442 -1.910834 7.615442 -1.994521C7.615442 -2.133998 7.489913 -2.133998 7.44807 -2.133998C7.308593 -2.133998 7.308593 -2.092154 7.238854 -1.882939C6.834371 -0.460274 6.206725 -0.153425 5.830137 -0.153425C5.565131 -0.153425 5.481445 -0.320797 5.481445 -0.613699C5.481445 -0.962391 5.634869 -1.352927 5.718555 -1.590037C5.955666 -2.203736 6.583313 -3.87746 6.583313 -4.658531C6.583313 -5.676712 5.941719 -6.164882 4.979328 -6.164882C4.546949 -6.164882 3.710087 -6.067248 2.915068 -5.104857L3.556663 -7.671233Z'/>
</defs>
<g id='page1'>
<use x='165.981071' y='97.429622' xlink:href='#g3-105'/>
<use x='169.774676' y='97.429622' xlink:href='#g0-126'/>
<use x='180.971707' y='87.993906' xlink:href='#g2-64'/>
<rect x='178.505856' y='93.663745' height='0.55789' width='12.899852'/>
<use x='178.505856' y='106.997046' xlink:href='#g2-64'/>
<use x='186.474036' y='106.997046' xlink:href='#g2-116'/>
<use x='192.601222' y='97.429622' xlink:href='#g1-106'/>
<use x='198.80019' y='97.429622' xlink:href='#g2-32'/>
<use x='208.179277' y='97.429622' xlink:href='#g3-40'/>
<use x='213.490324' y='97.429622' xlink:href='#g2-116'/>
<use x='218.42201' y='97.429622' xlink:href='#g3-41'/>
<use x='223.733057' y='97.429622' xlink:href='#g1-105'/>
<use x='233.031506' y='97.429622' xlink:href='#g3-61'/>
<use x='251.068923' y='93.903964' xlink:href='#g3-94'/>
<use x='247.527926' y='97.429622' xlink:href='#g2-72'/>
<use x='259.920966' y='97.429622' xlink:href='#g1-106'/>
<use x='266.119934' y='97.429622' xlink:href='#g2-32'/>
<use x='275.499021' y='97.429622' xlink:href='#g3-40'/>
<use x='280.810068' y='97.429622' xlink:href='#g2-116'/>
<use x='285.741754' y='97.429622' xlink:href='#g3-41'/>
<use x='291.052801' y='97.429622' xlink:href='#g1-105'/>
<use x='296.476924' y='97.429622' xlink:href='#g2-58'/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -4,17 +4,21 @@
Architecture
============
.. sidebar:: Needs work!
.. sidebar:: Further reading
This article needs some work / Searx is a collaborative effort. If you have
any contribution, feel welcome to send us your :pull:`PR <../pulls>`, see
:ref:`how to contribute`.
- Reverse Proxy: :ref:`Apache <apache searx site>` & :ref:`nginx <nginx searx
site>`
- Filtron: :ref:`searx filtron`
- Morty: :ref:`searx morty`
- uWSGI: :ref:`searx uwsgi`
- Searx: :ref:`installation basic`
Herein you will find some hints and suggestions about typical architectures of
searx infrastructures.
We start with a contribution from :pull:`@dalf <1776#issuecomment-567917320>`.
It shows a *reference* setup for public searx instances.
It shows a *reference* setup for public searx instances which can build up and
maintained by the scripts from our :ref:`toolboxing`.
.. _arch public:

View File

@ -9,8 +9,27 @@ Buildhosts
If you have any contribution send us your :pull:`PR <../pulls>`, see
:ref:`how to contribute`.
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
To get best results from build, its recommend to install additional packages
on build hosts.
on build hosts (see :ref:`searx.sh`).::
sudo -H ./utils/searx.sh install buildhost
This will install packages needed by searx:
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START distro-packages
:end-before: END distro-packages
and packages needed to build docuemtation and run tests:
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START build-packages
:end-before: END build-packages
.. _docs build:
@ -35,8 +54,17 @@ processing additional packages are needed. The XeTeX_ needed not only for PDF
creation, its also needed for :ref:`math` when HTML output is build.
To be able to do :ref:`sphinx:math-support` without CDNs, the math are rendered
as images (``sphinx.ext.imgmath`` extension). If your docs build (``make
docs``) shows warnings like this::
as images (``sphinx.ext.imgmath`` extension).
Here is the extract from the :origin:`docs/conf.py` file, setting math renderer
to ``imgmath``:
.. literalinclude:: ../conf.py
:language: python
:start-after: # sphinx.ext.imgmath setup
:end-before: # sphinx.ext.imgmath setup END
If your docs build (``make docs``) shows warnings like this::
WARNING: dot(1) not found, for better output quality install \
graphviz from http://www.graphviz.org
@ -47,8 +75,6 @@ docs``) shows warnings like this::
you need to install additional packages on your build host, to get better HTML
output.
.. _system requirements:
.. tabs::
.. group-tab:: Ubuntu / debian
@ -92,12 +118,38 @@ For PDF output you also need:
$ sudo dnf install \
texlive-collection-fontsrecommended texlive-collection-latex \
dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts
dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts \
ImageMagick
.. _system requirements END:
.. _sh lint:
.. literalinclude:: ../conf.py
:language: python
:start-after: # sphinx.ext.imgmath setup
:end-before: # sphinx.ext.imgmath setup END
Lint shell scripts
==================
.. _ShellCheck: https://github.com/koalaman/shellcheck
To lint shell scripts, we use ShellCheck_ - A shell script static analysis tool.
.. SNIP sh lint requirements
.. tabs::
.. group-tab:: Ubuntu / debian
.. code-block:: sh
$ sudo apt install shellcheck
.. group-tab:: Arch Linux
.. code-block:: sh
$ sudo pacman -S shellcheck
.. group-tab:: Fedora / RHEL
.. code-block:: sh
$ sudo dnf install ShellCheck
.. SNAP sh lint requirements

View File

@ -26,6 +26,8 @@ Safe search **SS**
Weigth **W**
------------- ----------- ---------------------------------
Disabled **D**
------------- ----------- ---------------------------------
Show errors **DE**
============= =========== =================================
Configuration defaults (at built time):
@ -51,6 +53,7 @@ Configuration defaults (at built time):
- O
- W
- D
- DE
{% for name, mod in engines.items() %}
@ -67,5 +70,6 @@ Configuration defaults (at built time):
- {{(mod.offline and "y") or ""}}
- {{mod.weight or 1 }}
- {{(mod.disabled and "y") or ""}}
- {{(mod.display_error_messages and "y") or ""}}
{% endfor %}

View File

@ -1,18 +1,51 @@
.. _searx filtron:
==========================
How to protect an instance
==========================
Searx depens on external search services. To avoid the abuse of these services
.. sidebar:: further reading
- :ref:`filtron.sh`
- :ref:`nginx searx site`
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. _filtron: https://github.com/asciimoo/filtron
Searx depends on external search services. To avoid the abuse of these services
it is advised to limit the number of requests processed by searx.
An application firewall, ``filtron`` solves exactly this problem. Information
on how to install it can be found at the `project page of filtron
<https://github.com/asciimoo/filtron>`__.
An application firewall, filtron_ solves exactly this problem. Filtron is just
a middleware between your web server (nginx, apache, ...) and searx, we describe
such infratructures in chapter: :ref:`architecture`.
filtron & go
============
.. _Go: https://golang.org/
.. _filtron README: https://github.com/asciimoo/filtron/blob/master/README.md
Filtron needs Go_ installed. If Go_ is preinstalled, filtron_ is simply
installed by ``go get`` package management (see `filtron README`_). If you use
filtron as middleware, a more isolated setup is recommended. To simplify such
an installation and the maintenance of, use our script :ref:`filtron.sh`.
.. _Sample configuration of filtron:
Sample configuration of filtron
===============================
.. sidebar:: Tooling box
- :origin:`/etc/filtron/rules.json <utils/templates/etc/filtron/rules.json>`
An example configuration can be find below. This configuration limits the access
of:
@ -24,105 +57,104 @@ of:
.. code:: json
[{
"name":"search request",
"filters":[
"Param:q",
"Path=^(/|/search)$"
],
"interval":"<time-interval-in-sec (int)>",
"limit":"<max-request-number-in-interval (int)>",
"subrules":[
{
"name":"roboagent limit",
"interval":"<time-interval-in-sec (int)>",
"limit":"<max-request-number-in-interval (int)>",
"filters":[
"Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client)"
[
{
"name": "search request",
"filters": [
"Param:q",
"Path=^(/|/search)$"
],
"actions":[
{
"name":"block",
"params":{
"message":"Rate limit exceeded"
}
}
"interval": "<time-interval-in-sec (int)>"
"limit": "<max-request-number-in-interval (int)>",
"subrules": [
{
"name": "missing Accept-Language",
"filters": ["!Header:Accept-Language"],
"limit": "<max-request-number-in-interval (int)>",
"stop": true,
"actions": [
{"name":"log"},
{"name": "block",
"params": {"message": "Rate limit exceeded"}}
]
},
{
"name": "suspiciously Connection=close header",
"filters": ["Header:Connection=close"],
"limit": "<max-request-number-in-interval (int)>",
"stop": true,
"actions": [
{"name":"log"},
{"name": "block",
"params": {"message": "Rate limit exceeded"}}
]
},
{
"name": "IP limit",
"interval": "<time-interval-in-sec (int)>"
"limit": "<max-request-number-in-interval (int)>",
"stop": true,
"aggregations": [
"Header:X-Forwarded-For"
],
"actions": [
{ "name": "log"},
{ "name": "block",
"params": {
"message": "Rate limit exceeded"
}
}
]
},
{
"name": "rss/json limit",
"filters": [
"Param:format=(csv|json|rss)"
],
"interval": "<time-interval-in-sec (int)>"
"limit": "<max-request-number-in-interval (int)>",
"stop": true,
"actions": [
{ "name": "log"},
{ "name": "block",
"params": {
"message": "Rate limit exceeded"
}
}
]
},
{
"name": "useragent limit",
"interval": "<time-interval-in-sec (int)>"
"limit": "<max-request-number-in-interval (int)>",
"aggregations": [
"Header:User-Agent"
],
"actions": [
{ "name": "log"},
{ "name": "block",
"params": {
"message": "Rate limit exceeded"
}
}
]
}
]
},
{
"name":"botlimit",
"limit":0,
"stop":true,
"filters":[
"Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)"
],
"actions":[
{
"name":"block",
"params":{
"message":"Rate limit exceeded"
}
}
]
},
{
"name":"IP limit",
"interval":"<time-interval-in-sec (int)>",
"limit":"<max-request-number-in-interval (int)>",
"stop":true,
"aggregations":[
"Header:X-Forwarded-For"
],
"actions":[
{
"name":"block",
"params":{
"message":"Rate limit exceeded"
}
}
]
},
{
"name":"rss/json limit",
"interval":"<time-interval-in-sec (int)>",
"limit":"<max-request-number-in-interval (int)>",
"stop":true,
"filters":[
"Param:format=(csv|json|rss)"
],
"actions":[
{
"name":"block",
"params":{
"message":"Rate limit exceeded"
}
}
]
},
{
"name":"useragent limit",
"interval":"<time-interval-in-sec (int)>",
"limit":"<max-request-number-in-interval (int)>",
"aggregations":[
"Header:User-Agent"
],
"actions":[
{
"name":"block",
"params":{
"message":"Rate limit exceeded"
}
}
]
}
]
}]
}
]
.. _filtron route request:
Route request through filtron
=============================
.. sidebar:: further reading
- :ref:`filtron.sh overview`
- :ref:`installation nginx`
- :ref:`installation apache`
Filtron can be started using the following command:
.. code:: sh
@ -136,13 +168,24 @@ Use it along with ``nginx`` with the following example configuration.
.. code:: nginx
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_pass http://127.0.0.1:4004/;
# https://example.org/searx
location /searx {
proxy_pass http://127.0.0.1:4004/;
proxy_set_header Host $http_host;
proxy_set_header Connection $http_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /searx;
}
location /searx/static {
/usr/local/searx/searx-src/searx/static;
}
Requests are coming from port 4004 going through filtron and then forwarded to
port 8888 where a searx is being run.
port 8888 where a searx is being run. For a complete setup see: :ref:`nginx
searx site`.

View File

@ -3,9 +3,16 @@ Administrator documentation
===========================
.. toctree::
:maxdepth: 1
:maxdepth: 2
:caption: Contents
installation
installation-searx
installation-uwsgi
installation-nginx
installation-apache
installation-docker
update-searx
settings
api
architecture

View File

@ -0,0 +1,514 @@
.. _installation apache:
===================
Install with apache
===================
.. _Apache: https://httpd.apache.org/
.. _Apache Debian:
https://cwiki.apache.org/confluence/display/HTTPD/DistrosDefaultLayout#DistrosDefaultLayout-Debian,Ubuntu(Apachehttpd2.x):
.. _README.Debian:
https://salsa.debian.org/apache-team/apache2/raw/master/debian/apache2.README.Debian
.. _Apache Arch Linux:
https://wiki.archlinux.org/index.php/Apache_HTTP_Server
.. _Apache Fedora:
https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-apache-http-server/index.html
.. _Apache directives:
https://httpd.apache.org/docs/trunk/mod/directives.html
.. _Getting Started:
https://httpd.apache.org/docs/current/en/getting-started.html
.. _Terms Used to Describe Directives:
https://httpd.apache.org/docs/current/en/mod/directive-dict.html
.. _Configuration Files:
https://httpd.apache.org/docs/current/en/configuring.html
.. _ProxyPreserveHost: https://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxypreservehost
.. _LoadModule:
https://httpd.apache.org/docs/2.4/mod/mod_so.html#loadmodule
.. _DocumentRoot:
https://httpd.apache.org/docs/trunk/mod/core.html#documentroot
.. _Location:
https://httpd.apache.org/docs/trunk/mod/core.html#location
.. _uWSGI Apache support:
https://uwsgi-docs.readthedocs.io/en/latest/Apache.html
.. _mod_proxy_uwsgi:
https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-proxy-uwsgi
.. sidebar:: further read
- `Apache Arch Linux`_
- `Apache Debian`_ and `README.Debian`_
- `Apache Fedora`_
- `Apache directives`_
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
----
**Install** :ref:`apache searx site` using :ref:`filtron.sh <filtron.sh overview>`
.. code:: bash
$ sudo -H ./utils/filtron.sh apache install
**Install** :ref:`apache searx site` using :ref:`morty.sh <morty.sh overview>`
.. code:: bash
$ sudo -H ./utils/morty.sh apache install
----
The apache HTTP server
======================
If Apache_ is not installed, install it now. If apache_ is new to you, the
`Getting Started`_, `Configuration Files`_ and `Terms Used to Describe
Directives`_ documentation gives first orientation. There is also a list of
`Apache directives`_ *to keep in the pocket*.
.. tabs::
.. group-tab:: Ubuntu / debian
.. code:: sh
sudo -H apt-get install apache2
.. group-tab:: Arch Linux
.. code:: sh
sudo -H pacman -S apache
sudo -H systemctl enable httpd
sudo -H systemctl start http
.. group-tab:: Fedora / RHEL
.. code:: sh
sudo -H dnf install httpd
sudo -H systemctl enable httpd
sudo -H systemctl start httpd
Now at http://localhost you should see any kind of *Welcome* or *Test* page.
How this default intro site is configured, depends on the linux distribution
(compare `Apache directives`_).
.. tabs::
.. group-tab:: Ubuntu / debian
.. code:: sh
less /etc/apache2/sites-enabled/000-default.conf
In this file, there is a line setting the `DocumentRoot`_ directive:
.. code:: apache
DocumentRoot /var/www/html
And the *welcome* page is the HTML file at ``/var/www/html/index.html``.
.. group-tab:: Arch Linux
.. code:: sh
less /etc/httpd/conf/httpd.conf
In this file, there is a line setting the `DocumentRoot`_ directive:
.. code:: apache
DocumentRoot "/srv/http"
<Directory "/srv/http">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
The *welcome* page of Arch Linux is a page showing directory located at
``DocumentRoot``. This is *directory* page is generated by the Module
`mod_autoindex <https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html>`_:
.. code:: apache
LoadModule autoindex_module modules/mod_autoindex.so
...
Include conf/extra/httpd-autoindex.conf
.. group-tab:: Fedora / RHEL
.. code:: sh
less /etc/httpd/conf/httpd.conf
In this file, there is a line setting the ``DocumentRoot`` directive:
.. code:: apache
DocumentRoot "/var/www/html"
...
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
On fresh installations, the ``/var/www`` is empty and the *default
welcome page* is shown, the configuration is located at::
less /etc/httpd/conf.d/welcome.conf
.. _apache searx site:
Apache Reverse Proxy
====================
.. sidebar:: public to the internet?
If your searx instance is public, stop here and first install :ref:`filtron
reverse proxy <filtron.sh>` and :ref:`result proxy morty <morty.sh>`, see
:ref:`installation scripts`. If already done, follow setup: *searx via
filtron plus morty*.
To setup a Apache revers proxy you have to enable the *headers* and *proxy*
modules and create a `Location`_ configuration for the searx site. In most
distributions you have to un-comment the lines in the main configuration file,
except in :ref:`The Debian Layout`.
To pass the HTTP HOST header
With ProxyPreserveHost_ the incoming Host HTTP request header is passed to the
proxied host.
.. tabs::
.. group-tab:: Ubuntu / debian
In the Apache setup, enable headers and proxy modules:
.. code:: sh
sudo -H a2enmod headers
sudo -H a2enmod proxy
sudo -H a2enmod proxy_http
In :ref:`The Debian Layout` you create a ``searx.conf`` with the
``<Location /searx >`` directive and save this file in the *sites
available* folder at ``/etc/apache2/sites-available``. To enable the
``searx.conf`` use :man:`a2ensite`:
.. code:: sh
sudo -H a2ensite searx.conf
.. group-tab:: Arch Linux
In the ``/etc/httpd/conf/httpd.conf`` file, activate headers and proxy
modules (LoadModule_):
.. code:: apache
FIXME needs test
LoadModule headers_module modules/mod_headers.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
.. group-tab:: Fedora / RHEL
In the ``/etc/httpd/conf/httpd.conf`` file, activate headers and proxy
modules (LoadModule_):
.. code:: apache
FIXME needs test
LoadModule headers_module modules/mod_headers.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
.. tabs::
.. group-tab:: searx via filtron plus morty
Use this setup, if your instance is public to the internet, compare
figure: :ref:`architecture <arch public>` and :ref:`installation scripts`.
1. Configure a reverse proxy for :ref:`filtron <filtron.sh>`, listening on
*localhost 4004* (:ref:`filtron route request`):
.. code:: apache
<Location /searx >
# SetEnvIf Request_URI "/searx" dontlog
# CustomLog /dev/null combined env=dontlog
Require all granted
Order deny,allow
Deny from all
#Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
Allow from all
ProxyPreserveHost On
ProxyPass http://127.0.0.1:4004
RequestHeader set X-Script-Name /searx
</Location>
2. Configure reverse proxy for :ref:`morty <searx morty>`, listening on
*localhost 3000*
.. code:: apache
ProxyPreserveHost On
<Location /morty >
# SetEnvIf Request_URI "/morty" dontlog
# CustomLog /dev/null combined env=dontlog
Require all granted
Order deny,allow
Deny from all
#Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
Allow from all
ProxyPass http://127.0.0.1:3000
RequestHeader set X-Script-Name /morty
</Location>
Note that reverse proxy advised to be used in case of single-user or
low-traffic instances. For a fully result proxification add :ref:`morty's
<searx morty>` **public URL** to your :origin:`searx/settings.yml`:
.. code:: yaml
result_proxy:
# replace example.org with your server's public name
url : https://example.org/morty
server:
image_proxy : True
uWSGI support
=============
Be warned, with this setup, your instance isn't :ref:`protected <searx
filtron>`, nevertheless it is good enough for intranet usage. In modern Linux
distributions, the `mod_proxy_uwsgi`_ is compiled into the *normal* apache
package and you need to install only the :ref:`uWSGI <searx uwsgi>` package:
.. tabs::
.. group-tab:: Ubuntu / debian
.. code:: sh
sudo -H apt-get install uwsgi
# Ubuntu =< 18.04
sudo -H apt-get install libapache2-mod-proxy-uwsgi
.. group-tab:: Arch Linux
.. code:: sh
sudo -H pacman -S uwsgi
.. group-tab:: Fedora / RHEL
.. code:: sh
sudo -H dnf install uwsgi
The next example shows a configuration using the `uWSGI Apache support`_ via
unix sockets and `mod_proxy_uwsgi`_.
For socket communication, you have to activate ``socket =
/run/uwsgi/app/searx/socket`` and comment out the ``http = 127.0.0.1:8888``
configuration in your :ref:`uwsgi ini file <uwsgi configuration>`. If not
already exists, create a folder for the unix sockets, which can be used by the
searx account (see :ref:`create searx user`):
.. code:: bash
sudo -H mkdir -p /run/uwsgi/app/searx/
sudo -H chown -R searx:searx /run/uwsgi/app/searx/
If the server is public; to limit access to your intranet replace ``Allow from
all`` directive and replace ``192.168.0.0/16`` with your subnet IP/class.
.. tabs::
.. group-tab:: Ubuntu / debian
.. code:: apache
LoadModule headers_module /usr/lib/apache2/mod_headers.so
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_uwsgi_module /usr/lib/apache2/modules/mod_proxy_uwsgi.so
# SetEnvIf Request_URI /searx dontlog
# CustomLog /dev/null combined env=dontlog
<Location /searx>
Require all granted
Order deny,allow
Deny from all
# Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
Allow from all
ProxyPreserveHost On
ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
</Location>
.. group-tab:: Arch Linux
.. code:: apache
FIXME needs test
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
# SetEnvIf Request_URI /searx dontlog
# CustomLog /dev/null combined env=dontlog
<Location /searx>
Require all granted
Order deny,allow
Deny from all
# Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
Allow from all
ProxyPreserveHost On
ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
</Location>
.. group-tab:: Fedora / RHEL
.. code:: apache
FIXME needs test
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
<IfModule proxy_uwsgi_module>
# SetEnvIf Request_URI /searx dontlog
# CustomLog /dev/null combined env=dontlog
<Location /searx>
Require all granted
Order deny,allow
Deny from all
# Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
Allow from all
ProxyPreserveHost On
ProxyPass unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
</Location>
</IfModule>
.. group-tab:: old mod_wsgi
We show this only for historical reasons, DON'T USE `mod_uwsgi
<https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-uwsgi>`_.
ANYMORE!
.. code:: apache
<IfModule mod_uwsgi.c>
# SetEnvIf Request_URI "/searx" dontlog
# CustomLog /dev/null combined env=dontlog
<Location /searx >
Require all granted
Options FollowSymLinks Indexes
SetHandler uwsgi-handler
uWSGISocket /run/uwsgi/app/searx/socket
Order deny,allow
Deny from all
# Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1
Allow from all
</Location>
</IfModule>
.. _restart apache:
Restart service
===============
.. tabs::
.. group-tab:: Ubuntu / debian
.. code:: sh
sudo -H systemctl restart apache2
sudo -H service uwsgi restart searx
.. group-tab:: Arch Linux
.. code:: sh
sudo -H systemctl restart httpd
sudo -H systemctl restart uwsgi@searx
.. group-tab:: Fedora / RHEL
.. code:: sh
sudo -H systemctl restart httpd
sudo -H touch /etc/uwsgi.d/searx.ini
disable logs
============
For better privacy you can disable Apache logs. In the examples above activate
one of the lines and `restart apache`_::
# SetEnvIf Request_URI "/searx" dontlog
# CustomLog /dev/null combined env=dontlog
The ``CustomLog`` directive disable logs for the whole (virtual) server, use it
when the URL of the service does not have a path component (``/searx``) / is
located at root (``/``).
.. _The Debian Layout:
The Debian Layout
=================
Be aware that the Debian layout is quite different from the standard Apache
configuration. For details look at the README.Debian_
(``/usr/share/doc/apache2/README.Debian.gz``). Some commands you should know on
Debian:
* :man:`apache2ctl`: Apache HTTP server control interface
* :man:`a2enmod`, :man:`a2dismod`: switch on/off modules
* :man:`a2enconf`, :man:`a2disconf`: switch on/off configurations
* :man:`a2ensite`, :man:`a2dissite`: switch on/off sites

View File

@ -0,0 +1,28 @@
.. _installation docker:
===================
Docker installation
===================
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
Make sure you have installed Docker. For instance, you can deploy searx like this:
.. code:: sh
docker pull wonderfall/searx
docker run -d --name searx -p $PORT:8888 wonderfall/searx
Go to ``http://localhost:$PORT``.
See https://hub.docker.com/r/wonderfall/searx/ for more informations. It's also
possible to build searx from the embedded Dockerfile.
.. code:: sh
git clone https://github.com/asciimoo/searx.git
cd searx
docker build -t whatever/searx .

View File

@ -0,0 +1,381 @@
.. _installation nginx:
==================
Install with nginx
==================
.. _nginx:
https://docs.nginx.com/nginx/admin-guide/
.. _nginx server configuration:
https://docs.nginx.com/nginx/admin-guide/web-server/web-server/#setting-up-virtual-servers
.. _nginx beginners guide:
http://nginx.org/en/docs/beginners_guide.html
.. _Getting Started wiki:
https://www.nginx.com/resources/wiki/start/
.. _uWSGI support from nginx:
https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html
.. _uwsgi_params:
https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html#configuring-nginx
.. _SCRIPT_NAME:
https://werkzeug.palletsprojects.com/en/1.0.x/wsgi/#werkzeug.wsgi.get_script_name
.. sidebar:: further reading
- nginx_
- `nginx beginners guide`_
- `nginx server configuration`_
- `Getting Started wiki`_
- `uWSGI support from nginx`_
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
----
**Install** :ref:`nginx searx site` using :ref:`filtron.sh <filtron.sh overview>`
.. code:: bash
$ sudo -H ./utils/filtron.sh nginx install
**Install** :ref:`nginx searx site` using :ref:`morty.sh <morty.sh overview>`
.. code:: bash
$ sudo -H ./utils/morty.sh nginx install
----
The nginx HTTP server
=====================
If nginx_ is not installed (uwsgi will not work with the package nginx-light),
install it now.
.. tabs::
.. group-tab:: Ubuntu / debian
.. code:: sh
sudo -H apt-get install nginx
.. group-tab:: Arch Linux
.. code-block:: sh
sudo -H pacman -S nginx-mainline
sudo -H systemctl enable nginx
sudo -H systemctl start nginx
.. group-tab:: Fedora / RHEL
.. code-block:: sh
sudo -H dnf install nginx
sudo -H systemctl enable nginx
sudo -H systemctl start nginx
Now at http://localhost you should see a *Welcome to nginx!* page, on Fedora you
see a *Fedora Webserver - Test Page*. The test page comes from the default
`nginx server configuration`_. How this default intro site is configured,
depends on the linux distribution:
.. tabs::
.. group-tab:: Ubuntu / debian
.. code:: sh
less /etc/nginx/nginx.conf
there is a line including site configurations from:
.. code:: nginx
include /etc/nginx/sites-enabled/*;
.. group-tab:: Arch Linux
.. code-block:: sh
less /etc/nginx/nginx.conf
in there is a configuration section named ``server``:
.. code-block:: nginx
server {
listen 80;
server_name localhost;
# ...
}
.. group-tab:: Fedora / RHEL
.. code-block:: sh
less /etc/nginx/nginx.conf
there is a line including site configurations from:
.. code:: nginx
include /etc/nginx/conf.d/*.conf;
.. _nginx searx site:
A nginx searx site
==================
.. sidebar:: public to the internet?
If your searx instance is public, stop here and first install :ref:`filtron
reverse proxy <filtron.sh>` and :ref:`result proxy morty <morty.sh>`, see
:ref:`installation scripts`. If already done, follow setup: *searx via
filtron plus morty*.
Now you have to create a configuration for the searx site. If nginx_ is new to
you, the `nginx beginners guide`_ is a good starting point and the `Getting
Started wiki`_ is always a good resource *to keep in the pocket*.
.. tabs::
.. group-tab:: Ubuntu / debian
Create configuration at ``/etc/nginx/sites-available/searx`` and place a
symlink to sites-enabled:
.. code:: sh
sudo -H ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx
.. group-tab:: Arch Linux
In the ``/etc/nginx/nginx.conf`` file, replace the configuration section
named ``server``.
.. group-tab:: Fedora / RHEL
Create configuration at ``/etc/nginx/conf.d/searx`` and place a
symlink to sites-enabled:
.. tabs::
.. group-tab:: searx via filtron plus morty
Use this setup, if your instance is public to the internet, compare
figure: :ref:`architecture <arch public>` and :ref:`installation scripts`.
1. Configure a reverse proxy for :ref:`filtron <filtron.sh>`, listening on
*localhost 4004* (:ref:`filtron route request`):
.. code:: nginx
# https://example.org/searx
location /searx {
proxy_pass http://127.0.0.1:4004/;
proxy_set_header Host $http_host;
proxy_set_header Connection $http_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /searx;
}
location /searx/static {
/usr/local/searx/searx-src/searx/static;
}
2. Configure reverse proxy for :ref:`morty <searx morty>`, listening on
*localhost 3000*:
.. code:: nginx
# https://example.org/morty
location /morty {
proxy_pass http://127.0.0.1:3000/;
proxy_set_header Host $http_host;
proxy_set_header Connection $http_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
}
Note that reverse proxy advised to be used in case of single-user or
low-traffic instances. For a fully result proxification add :ref:`morty's
<searx morty>` **public URL** to your :origin:`searx/settings.yml`:
.. code:: yaml
result_proxy:
# replace example.org with your server's public name
url : https://example.org/morty
server:
image_proxy : True
.. group-tab:: proxy or uWSGI
Be warned, with this setup, your instance isn't :ref:`protected <searx
filtron>`. Nevertheless it is good enough for intranet usage and it is a
excellent example of; *how different services can be set up*. The next
example shows a reverse proxy configuration wrapping the :ref:`searx-uWSGI
application <uwsgi configuration>`, listening on ``http =
127.0.0.1:8888``.
.. code:: nginx
# https://hostname.local/
location / {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $host;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_buffering off;
}
Alternatively you can use the `uWSGI support from nginx`_ via unix
sockets. For socket communication, you have to activate ``socket =
/run/uwsgi/app/searx/socket`` and comment out the ``http =
127.0.0.1:8888`` configuration in your :ref:`uwsgi ini file <uwsgi
configuration>`.
The example shows a nginx virtual ``server`` configuration, listening on
port 80 (IPv4 and IPv6 http://[::]:80). The uWSGI app is configured at
location ``/`` by importing the `uwsgi_params`_ and passing requests to
the uWSGI socket (``uwsgi_pass``). The ``server``\'s root points to the
:ref:`searx-src clone <searx-src>` and wraps directly the
:origin:`searx/static/` content at ``location /static``.
.. code:: nginx
server {
# replace hostname.local with your server's name
server_name hostname.local;
listen 80;
listen [::]:80;
location / {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
}
root /usr/local/searx/searx-src/searx;
location /static { }
}
If not already exists, create a folder for the unix sockets, which can be
used by the searx account:
.. code:: bash
mkdir -p /run/uwsgi/app/searx/
sudo -H chown -R searx:searx /run/uwsgi/app/searx/
.. group-tab:: \.\. at subdir URL
Be warned, with these setups, your instance isn't :ref:`protected <searx
filtron>`. The examples are just here to demonstrate how to export the
searx application from a subdirectory URL ``https://example.org/searx/``.
.. code:: nginx
# https://hostname.local/searx
location /searx {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $host;
proxy_set_header Connection $http_connection;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /searx;
proxy_buffering off;
}
location /searx/static {
alias /usr/local/searx/searx-src/searx/static;
}
The ``X-Script-Name /searx`` is needed by the searx implementation to
calculate relative URLs correct. The next example shows a uWSGI
configuration. Since there are no HTTP headers in a (u)WSGI protocol, the
value is shipped via the SCRIPT_NAME_ in the WSGI environment.
.. code:: nginx
# https://hostname.local/searx
location /searx {
uwsgi_param SCRIPT_NAME /searx;
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
}
location /searx/static {
alias /usr/local/searx/searx-src/searx;
}
For searx to work correctly the ``base_url`` must be set in the
:origin:`searx/settings.yml`.
.. code:: yaml
server:
# replace example.org with your server's public name
base_url : https://example.org/searx/
Restart service:
.. tabs::
.. group-tab:: Ubuntu / debian
.. code:: sh
sudo -H systemctl restart nginx
sudo -H service uwsgi restart searx
.. group-tab:: Arch Linux
.. code:: sh
sudo -H systemctl restart nginx
sudo -H systemctl restart uwsgi@searx
.. group-tab:: Fedora
.. code:: sh
sudo -H systemctl restart nginx
sudo -H touch /etc/uwsgi.d/searx.ini
Disable logs
============
For better privacy you can disable nginx logs in ``/etc/nginx/nginx.conf``.
.. code:: nginx
http {
# ...
access_log /dev/null;
error_log /dev/null;
# ...
}

View File

@ -0,0 +1,92 @@
.. _installation basic:
=========================
Step by step installation
=========================
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
Step by step installation with virtualenv. For Ubuntu, be sure to have enable
universe repository.
.. _install packages:
Install packages
================
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START distro-packages
:end-before: END distro-packages
.. hint::
This installs also the packages needed by :ref:`searx uwsgi`
.. _create searx user:
Create user
===========
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START create user
:end-before: END create user
.. _searx-src:
install searx & dependencies
============================
Start a interactive shell from new created user and clone searx:
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START clone searx
:end-before: END clone searx
In the same shell create *virtualenv*:
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START create virtualenv
:end-before: END create virtualenv
To install searx's dependencies, exit the searx *bash* session you opened above
and restart a new. Before install, first check if your *virualenv* was sourced
from the login (*~/.profile*):
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START manage.sh update_packages
:end-before: END manage.sh update_packages
.. tip::
Open a second terminal for the configuration tasks and left the ``(searx)$``
terminal open for the tasks below.
Configuration
==============
Create a copy of the :origin:`searx/settings.yml` configuration file in system's
*/etc* folder. Configure like shown below -- replace ``searx@\$(uname -n)`` with
a name of your choice -- *and/or* edit ``/etc/searx/settings.yml`` if necessary.
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START searx config
:end-before: END searx config
Check
=====
To check your searx setup, optional enable debugging and start the *webapp*.
Searx looks at the exported environment ``$SEARX_SETTINGS_PATH`` for a
configuration file.
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START check searx installation
:end-before: END check searx installation
If everything works fine, hit ``[CTRL-C]`` to stop the *webapp* and disable the
debug option in ``settings.yml``. You can now exit searx user bash (enter exit
command twice). At this point searx is not demonized; uwsgi allows this.

View File

@ -0,0 +1,149 @@
.. _searx uwsgi:
=====
uwsgi
=====
.. sidebar:: further reading
- `systemd.unit`_
- `uWSGI Emperor`_
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. _systemd.unit: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
.. _One service per app in systemd:
https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd
.. _uWSGI Emperor:
https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html
.. _uwsgi ini file:
https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#ini-files
.. _systemd unit template:
http://0pointer.de/blog/projects/instances.html
Origin uWSGI
============
How uWSGI is implemented by distributors is different. uWSGI itself
recommend two methods
`systemd.unit`_ template files as described here `One service per app in systemd`_.
There is one `systemd unit template`_ and one `uwsgi ini file`_ per uWSGI-app
placed at dedicated locations. Take archlinux and a searx.ini as example::
unit template --> /usr/lib/systemd/system/uwsgi@.service
uwsgi ini files --> /etc/uwsgi/searx.ini
The searx app can be maintained as know from common systemd units::
systemctl enable uwsgi@searx
systemctl start uwsgi@searx
systemctl restart uwsgi@searx
systemctl stop uwsgi@searx
The `uWSGI Emperor`_ mode which fits for maintaining a large range of uwsgi apps.
The Emperor mode is a special uWSGI instance that will monitor specific
events. The Emperor mode (service) is started by a (common, not template)
systemd unit. The Emperor service will scan specific directories for `uwsgi
ini file`_\s (also know as *vassals*). If a *vassal* is added, removed or the
timestamp is modified, a corresponding action takes place: a new uWSGI
instance is started, reload or stopped. Take Fedora and a searx.ini as
example::
to start a new searx instance create --> /etc/uwsgi.d/searx.ini
to reload the instance edit timestamp --> touch /etc/uwsgi.d/searx.ini
to stop instance remove ini --> rm /etc/uwsgi.d/searx.ini
Distributors
============
The `uWSGI Emperor`_ mode and `systemd unit template`_ is what the distributors
mostly offer their users, even if they differ in the way they implement both
modes and their defaults. Another point they might differ is the packaging of
plugins (if so, compare :ref:`install packages`) and what the default python
interpreter is (python2 vs. python3).
Fedora starts a Emperor by default, while archlinux does not start any uwsgi
service by default. Worth to know; debian (ubuntu) follow a complete different
approach. *debian*: your are familiar with the apache infrastructure? .. they
do similar for the uWSGI infrastructure (with less comfort), the folders are::
/etc/uwsgi/apps-available/
/etc/uwsgi/apps-enabled/
The `uwsgi ini file`_ is enabled by a symbolic link::
ln -s /etc/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-enabled/
From debian's documentation (``/usr/share/doc/uwsgi/README.Debian.gz``): You
could control specific instance(s) by issuing::
service uwsgi <command> <confname> <confname> ...
sudo -H service uwsgi start searx
sudo -H service uwsgi stop searx
My experience is, that this command is a bit buggy.
.. _uwsgi configuration:
Alltogether
===========
Create the configuration ini-file according to your distribution (see below) and
restart the uwsgi application.
.. tabs::
.. group-tab:: Ubuntu / debian
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START searx uwsgi-description ubuntu-20.04
:end-before: END searx uwsgi-description ubuntu-20.04
.. group-tab:: Arch Linux
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START searx uwsgi-description arch
:end-before: END searx uwsgi-description arch
.. group-tab:: Fedora / RHEL
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:start-after: START searx uwsgi-description fedora
:end-before: END searx uwsgi-description fedora
.. tabs::
.. group-tab:: Ubuntu / debian
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:code: ini
:start-after: START searx uwsgi-appini ubuntu-20.04
:end-before: END searx uwsgi-appini ubuntu-20.04
.. group-tab:: Arch Linux
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:code: ini
:start-after: START searx uwsgi-appini arch
:end-before: END searx uwsgi-appini arch
.. group-tab:: Fedora / RHEL
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
:code: ini
:start-after: START searx uwsgi-appini fedora
:end-before: END searx uwsgi-appini fedora

View File

@ -4,346 +4,63 @@
Installation
============
.. contents::
:depth: 3
*You're spoilt for choice*, choose your preferred method of installation.
Basic installation
==================
- :ref:`installation docker`
- :ref:`installation scripts`
- :ref:`installation basic`
Step by step installation for Debian/Ubuntu with virtualenv. For Ubuntu, be sure
to have enable universe repository.
The :ref:`installation basic` is good enough for intranet usage and it is a
excellent illustration of *how a searx instance is build up*. If you place your
instance public to the internet you should really consider to install a
:ref:`filtron reverse proxy <filtron.sh>` and for privacy a :ref:`result proxy
<morty.sh>` is mandatory.
Install packages:
Therefore, if you do not have any special preferences, its recommend to use the
:ref:`installation docker` or the `Installation scripts`_ from our :ref:`tooling
box <toolboxing>` as described below.
.. code:: sh
.. _installation scripts:
$ sudo -H apt-get install \
git build-essential libxslt-dev \
python-dev python-virtualenv python-babel \
zlib1g-dev libffi-dev libssl-dev
Installation scripts
====================
Install searx:
.. sidebar:: Update OS first!
.. code:: sh
To avoid unwanted side effects, update your OS before installing searx.
cd /usr/local
sudo -H git clone https://github.com/asciimoo/searx.git
sudo -H useradd searx -d /usr/local/searx
sudo -H chown searx:searx -R /usr/local/searx
The following will install a setup as shown in :ref:`architecture`. First you
need to get a clone. The clone is only needed for the installation procedure
and some maintenance tasks (alternatively you can create your own fork).
Install dependencies in a virtualenv:
.. code:: bash
.. code:: sh
$ cd ~/Downloads
$ git clone https://github.com/asciimoo/searx searx
$ cd searx
cd /usr/local/searx
sudo -H -u searx -i
**Install** :ref:`searx service <searx.sh>`
.. code:: sh
This installs searx as described in :ref:`installation basic`.
(searx)$ virtualenv searx-ve
(searx)$ . ./searx-ve/bin/activate
(searx)$ ./manage.sh update_packages
.. code:: bash
Configuration
==============
$ sudo -H ./utils/searx.sh install all
.. code:: sh
**Install** :ref:`filtron reverse proxy <filtron.sh>`
sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
.. code:: bash
Edit searx/settings.yml if necessary.
$ sudo -H ./utils/filtron.sh install all
Check
=====
**Install** :ref:`result proxy <morty.sh>`
Start searx:
.. code:: bash
.. code:: sh
$ sudo -H ./utils/morty.sh install all
python searx/webapp.py
If all services are running fine, you can add it to your HTTP server:
Go to http://localhost:8888
- :ref:`installation apache`
- :ref:`installation nginx`
If everything works fine, disable the debug option in settings.yml:
.. code:: sh
sed -i -e "s/debug : True/debug : False/g" searx/settings.yml
At this point searx is not demonized ; uwsgi allows this.
You can exit the virtualenv and the searx user bash (enter exit command
twice).
uwsgi
=====
Install packages:
.. code:: sh
sudo -H apt-get install \
uwsgi uwsgi-plugin-python
Create the configuration file ``/etc/uwsgi/apps-available/searx.ini`` with this
content:
.. code:: ini
[uwsgi]
# Who will run the code
uid = searx
gid = searx
# disable logging for privacy
disable-logging = true
# Number of workers (usually CPU count)
workers = 4
# The right granted on the created socket
chmod-socket = 666
# Plugin to use and interpretor config
single-interpreter = true
master = true
plugin = python
lazy-apps = true
enable-threads = true
# 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/
chdir = /usr/local/searx/searx/
Activate the uwsgi application and restart:
.. code:: sh
cd /etc/uwsgi/apps-enabled
ln -s ../apps-available/searx.ini
/etc/init.d/uwsgi restart
Web server
==========
with nginx
----------
If nginx is not installed (uwsgi will not work with the package
nginx-light):
.. code:: sh
sudo -H apt-get install nginx
Hosted at /
~~~~~~~~~~~
Create the configuration file ``/etc/nginx/sites-available/searx`` with this
content:
.. code:: nginx
server {
listen 80;
server_name searx.example.com;
root /usr/local/searx/searx;
location /static {
}
location / {
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
}
}
Create a symlink to sites-enabled:
.. code:: sh
sudo -H ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx
Restart service:
.. code:: sh
sudo -H service nginx restart
sudo -H service uwsgi restart
from subdirectory URL (/searx)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Add this configuration in the server config file
``/etc/nginx/sites-enabled/default``:
.. code:: nginx
location /searx/static {
alias /usr/local/searx/searx/static;
}
location /searx {
uwsgi_param SCRIPT_NAME /searx;
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
}
**OR** using reverse proxy (Please, note that reverse proxy advised to be used
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;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Script-Name /searx;
proxy_buffering off;
}
Enable ``base_url`` in ``searx/settings.yml``
.. code:: yaml
base_url : http://your.domain.tld/searx/
Restart service:
.. code:: sh
sudo -H service nginx restart
sudo -H service uwsgi restart
disable logs
^^^^^^^^^^^^
for better privacy you can disable nginx logs about searx.
how to proceed: below ``uwsgi_pass`` in ``/etc/nginx/sites-available/default``
add:
.. code:: nginx
access_log /dev/null;
error_log /dev/null;
Restart service:
.. code:: sh
sudo -H service nginx restart
with apache
-----------
Add wsgi mod:
.. code:: sh
sudo -H apt-get install libapache2-mod-uwsgi
sudo -H a2enmod uwsgi
Add this configuration in the file ``/etc/apache2/apache2.conf``:
.. code:: apache
<Location />
Options FollowSymLinks Indexes
SetHandler uwsgi-handler
uWSGISocket /run/uwsgi/app/searx/socket
</Location>
Note that if your instance of searx is not at the root, you should change
``<Location />`` by the location of your instance, like ``<Location /searx>``.
Restart Apache:
.. code:: sh
sudo -H /etc/init.d/apache2 restart
disable logs
~~~~~~~~~~~~
For better privacy you can disable Apache logs.
.. warning::
You can only disable logs for the whole (virtual) server not for a specific
path.
Go back to ``/etc/apache2/apache2.conf`` and above ``<Location />`` add:
.. code:: apache
CustomLog /dev/null combined
Restart Apache:
.. code:: sh
sudo -H /etc/init.d/apache2 restart
How to update
=============
.. code:: sh
cd /usr/local/searx
sudo -H -u searx -i
.. code:: sh
(searx)$ . ./searx-ve/bin/activate
(searx)$ git stash
(searx)$ git pull origin master
(searx)$ git stash apply
(searx)$ ./manage.sh update_packages
.. code:: sh
sudo -H service uwsgi restart
Docker
======
Make sure you have installed Docker. For instance, you can deploy searx like this:
.. code:: sh
docker pull wonderfall/searx
docker run -d --name searx -p $PORT:8888 wonderfall/searx
Go to ``http://localhost:$PORT``.
See https://hub.docker.com/r/wonderfall/searx/ for more informations. It's also
possible to build searx from the embedded Dockerfile.
.. code:: sh
git clone https://github.com/asciimoo/searx.git
cd searx
docker build -t whatever/searx .
References
==========
* https://about.okhin.fr/posts/Searx/ with some additions
* 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/>`__

View File

@ -1,7 +1,14 @@
.. _searx morty:
=========================
How to setup result proxy
=========================
.. sidebar:: further reading
- :ref:`morty.sh`
.. _morty: https://github.com/asciimoo/morty
.. _morty's README: https://github.com/asciimoo/morty

View File

@ -4,11 +4,17 @@
``settings.yml``
================
This page describe the options possibilities of the :origin:`searx/settings.yml`
file.
.. sidebar:: Further reading ..
- :ref:`search API`
This page describe the options possibilities of the settings.yml file.
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
.. _settings global:
@ -98,7 +104,7 @@ Global Settings
specific instance of searx, a locale can be defined using an ISO language
code, like ``fr``, ``en``, ``de``.
.. _requests proxies: http://docs.python-requests.org/en/latest/user/advanced/#proxies
.. _requests proxies: http://requests.readthedocs.io/en/latest/user/advanced/#proxies
.. _PR SOCKS support: https://github.com/kennethreitz/requests/pull/478
``outgoing_proxies`` :
@ -175,6 +181,9 @@ Engine settings
``weigth`` : default ``1``
Weighting of the results of this engine.
``display_error_messages`` : default ``True``
When an engine returns an error, the message is displayed on the user interface.
.. note::
A few more options are possible, but they are pretty specific to some

View File

@ -0,0 +1,23 @@
.. _update searx:
=============
How to update
=============
.. code:: sh
sudo -H -u searx -i
(searx)$ git stash
(searx)$ git pull origin master
(searx)$ git stash apply
(searx)$ ./manage.sh update_packages
Restart uwsgi:
.. tabs::
.. group-tab:: Ubuntu / debian
.. code:: sh
sudo -H systemctl restart uwsgi

View File

@ -3,7 +3,8 @@ Blog
====
.. toctree::
:maxdepth: 1
:maxdepth: 2
:caption: Contents
python3
admin

View File

@ -4,6 +4,11 @@
How to contribute
=================
.. contents:: Contents
:depth: 2
:local:
:backlinks: entry
Prime directives: Privacy, Hackability
======================================

View File

@ -57,6 +57,7 @@ engine string name of searx-engine
(filename without ``.py``)
shortcut string shortcut of search-engine
timeout string specific timeout for search-engine
display_error_messages boolean display error messages on the web UI
======================= =========== ===========================================

View File

@ -3,7 +3,8 @@ Developer documentation
=======================
.. toctree::
:maxdepth: 1
:maxdepth: 2
:caption: Contents
quickstart
contribution_guide

View File

@ -11,23 +11,17 @@ Makefile Targets
Before looking deeper at the targets, first read about :ref:`makefile setup`
and :ref:`make pyenv`.
To install system requirements follow :ref:`buildhosts`.
With the aim to simplify development cycles, started with :pull:`1756` a
``Makefile`` based boilerplate was added. If you are not familiar with
Makefiles, we recommend to read gnu-make_ introduction.
The usage is simple, just type ``make {target-name}`` to *build* a target.
Calling the ``help`` target gives a first overview::
Calling the ``help`` target gives a first overview (``make help``):
.. program-output:: bash -c "cd ..; make --no-print-directory help"
$ make help
test - run developer tests
docs - build documentation
docs-live - autobuild HTML documentation while editing
run - run developer instance
install - developer install (./local)
uninstall - uninstall (./local)
gh-pages - build docs & deploy on gh-pages branch
clean - drop builds and environments
...
.. contents:: Contents
:depth: 2
@ -37,27 +31,33 @@ Calling the ``help`` target gives a first overview::
.. _makefile setup:
Setup
=====
Makefile setup
==============
.. _git stash: https://git-scm.com/docs/git-stash
The main setup is done in the :origin:`Makefile`::
export GIT_URL=https://github.com/asciimoo/searx
export SEARX_URL=https://searx.me
export DOCS_URL=https://asciimoo.github.io/searx
.. sidebar:: fork & upstream
Commit changes in your (local) branch, fork or whatever, but do not push them
upstream / `git stash`_ is your friend.
:GIT_URL: Changes this, to point to your searx fork.
The main setup is done in the :origin:`Makefile`.
:SEARX_URL: Changes this, to point to your searx instance.
.. literalinclude:: ../../Makefile
:start-after: START Makefile setup
:end-before: END Makefile setup
:DOCS_URL: If you host your own (branded) documentation, change this URL.
:GIT_URL: Changes this, to point to your searx fork.
:GIT_BRANCH: Changes this, to point to your searx branch.
:SEARX_URL: Changes this, to point to your searx instance.
:DOCS_URL: If you host your own (*brand*) documentation, change this URL.
If you change any of this build environment variables, you have to run ``make
buildenv``::
$ make buildenv
build searx/brand.py
build utils/brand.env
.. _make pyenv:
@ -170,7 +170,7 @@ e.g.:
.. code:: sh
$ make test.pep8 test.unit
$ make test.pep8 test.unit test.sh
. ./local/py3/bin/activate; ./manage.sh pep8_check
[!] Running pep8 check
. ./local/py3/bin/activate; ./manage.sh unit_tests

View File

@ -27,7 +27,7 @@ searx-ve virtualenv and install the required packages using ``manage.sh``.
cd ~/myprojects
git clone https://github.com/asciimoo/searx.git
cd searx
virtualenv searx-ve
python3 -m venv searx-ve
. ./searx-ve/bin/activate
./manage.sh update_dev_packages
@ -87,8 +87,8 @@ After satisfying the requirements styles can be build using ``manage.sh``
./manage.sh styles
How to build the source of the oscar theme
==========================================
How to build the source of the themes
=====================================
.. _grunt: https://gruntjs.com/
@ -98,13 +98,13 @@ NodeJS, so first Node has to be installed.
.. code:: sh
sudo -H apt-get install nodejs
sudo -H npm install -g grunt-cli
make node.env
After installing grunt, the files can be built using the following command:
.. code:: sh
./manage.sh grunt_build
make themes
Tips for debugging/development

View File

@ -325,8 +325,9 @@ Literal blocks
The simplest form of :duref:`literal-blocks` is a indented block introduced by
two colons (``::``). For highlighting use :dudir:`highlight` or :ref:`reST
code` directive. To include literals from external files use directive
:dudir:`literalinclude`.
code` directive. To include literals from external files use
:rst:dir:`literalinclude` or :ref:`kernel-include <kernel-include-directive>`
directive (latter one expands environment variables in the path name).
.. _reST literal:
@ -1312,9 +1313,8 @@ others are basic-tabs_ and code-tabs_. Below a *group-tab* example from
.. literalinclude:: ../admin/buildhosts.rst
:language: reST
:start-after: .. _system requirements:
:end-before: .. _system requirements END:
:start-after: .. SNIP sh lint requirements
:end-before: .. SNAP sh lint requirements
.. _math:

View File

@ -2,7 +2,14 @@
Welcome to searx
================
Search without being tracked.
*Search without being tracked.*
Searx is a free internet metasearch engine which aggregates results from more
than 70 search services. Users are neither tracked nor profiled. Additionally,
searx can be used over Tor for online anonymity.
Get started with searx by using one of the Searx-instances_. If you don't trust
anyone, you can set up your own, see :ref:`installation`.
.. sidebar:: Features
@ -16,19 +23,14 @@ Search without being tracked.
- Hosted by organizations, such as *La Quadrature du Net*, which promote
digital rights
Searx is a free internet metasearch engine which aggregates results from more
than 70 search services. Users are neither tracked nor profiled. Additionally,
searx can be used over Tor for online anonymity.
Get started with searx by using one of the Searx-instances_. If you don't trust
anyone, you can set up your own, see :ref:`installation`.
.. toctree::
:maxdepth: 2
:caption: Contents
user/index
admin/index
dev/index
utils/index
blog/index
.. _Searx-instances: https://searx.space

View File

@ -3,7 +3,8 @@ User documentation
==================
.. toctree::
:maxdepth: 1
:maxdepth: 2
:caption: Contents
search_syntax
own-instance

View File

@ -2,8 +2,10 @@
Why use a private instance?
===========================
"Is it worth to run my own instance?" is a common question among searx users.
Before answering this question, see what options a searx user has.
*"Is it worth to run my own instance?"*
\.\. is a common question among searx users. Before answering this question,
see what options a searx user has.
Public instances are open to everyone who has access to its URL. Usually, these
are operated by unknown parties (from the users' point of view). Private

View File

@ -1,3 +0,0 @@
:orphan:
This page page has been moved to `searx.space <https://searx.space/>`__

View File

@ -0,0 +1,80 @@
.. _filtron.sh:
====================
``utils/filtron.sh``
====================
.. sidebar:: further reading
- :ref:`searx filtron`
- :ref:`architecture`
- :ref:`installation` (:ref:`nginx <installation nginx>` & :ref:`apache
<installation apache>`)
.. _Go: https://golang.org/
.. _filtron: https://github.com/asciimoo/filtron
.. _filtron README: https://github.com/asciimoo/filtron/blob/master/README.md
To simplify installation and maintenance of a filtron instance you can use the
script :origin:`utils/filtron.sh`. In most cases you will install filtron_
simply by running the command:
.. code:: bash
sudo -H ./utils/filtron.sh install all
The script adds a ``${SERVICE_USER}`` (default:``filtron``) and installs filtron_
into this user account:
#. Create a separated user account (``filtron``).
#. Download and install Go_ binary in user's $HOME (``~filtron``).
#. Install filtron with the package management from Go_ (``go get -v -u
github.com/asciimoo/filtron``)
#. Setup a proper rule configuration :origin:`[ref]
<utils/templates/etc/filtron/rules.json>` (``/etc/filtron/rules.json``).
#. Setup a systemd service unit :origin:`[ref]
<utils/templates/lib/systemd/system/filtron.service>`
(``/lib/systemd/system/filtron.service``).
Create user
===========
.. kernel-include:: $DOCS_BUILD/includes/filtron.rst
:start-after: START create user
:end-before: END create user
Install go
==========
.. kernel-include:: $DOCS_BUILD/includes/filtron.rst
:start-after: START install go
:end-before: END install go
Install filtron
===============
Install :origin:`rules.json <utils/templates/etc/filtron/rules.json>` at
``/etc/filtron/rules.json`` (see :ref:`Sample configuration of filtron`) and
install filtron software and systemd unit:
.. kernel-include:: $DOCS_BUILD/includes/filtron.rst
:start-after: START install filtron
:end-before: END install filtron
.. kernel-include:: $DOCS_BUILD/includes/filtron.rst
:start-after: START install systemd unit
:end-before: END install systemd unit
.. _filtron.sh overview:
Overview
========
The ``--help`` output of the script is largely self-explanatory
(:ref:`toolboxing common`):
.. program-output:: ../utils/filtron.sh --help

View File

@ -0,0 +1,53 @@
.. _searx_utils:
.. _toolboxing:
=======================
Tooling box ``utils/*``
=======================
In the folder :origin:`utils/` we maintain some tools useful for admins and
developers.
.. toctree::
:maxdepth: 2
:caption: Contents
searx.sh
filtron.sh
morty.sh
lxc.sh
.. _toolboxing common:
Common commands & environment
=============================
Scripts to maintain services often dispose of common commands and environments.
``shell`` : command
Opens a shell from the service user ``${SERVICE_USSR}``, very helpful for
troubleshooting.
``inspect service`` : command
Shows status and log of the service, most often you have a option to enable
more verbose debug logs. Very helpful for debugging, but be careful not to
enable debugging in a production environment!
``FORCE_TIMEOUT`` : environment
Sets timeout for interactive prompts. If you want to run a script in batch
job, with defaults choices, set ``FORCE_TIMEOUT=0``. By example; to install a
reverse proxy for filtron on all containers of the :ref:`searx suite
<lxc-searx.env>` use ::
sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/filtron.sh apache install
.. _toolboxing setup:
Tooling box setup
=================
The main setup is done in the :origin:`.config.sh` (read also :ref:`makefile
setup`).
.. literalinclude:: ../../.config.sh
:language: bash

View File

@ -0,0 +1,148 @@
.. _snap: https://snapcraft.io
.. _snapcraft LXD: https://snapcraft.io/lxd
.. _LXC/LXD Image Server: https://uk.images.linuxcontainers.org/
.. _LXC: https://linuxcontainers.org/lxc/introduction/
.. _LXD: https://linuxcontainers.org/lxd/introduction/
.. _`LXD@github`: https://github.com/lxc/lxd
.. _archlinux: https://www.archlinux.org/
.. _lxc.sh:
================
``utils/lxc.sh``
================
.. sidebar:: further reading
- snap_, `snapcraft LXD`_
- LXC_, LXD_
- `LXC/LXD Image Server`_
- `LXD@github`_
With the use of *Linux Containers* (LXC_) we can scale our tasks over a stack of
containers, what we call the: *lxc suite*. The *searx suite*
(:origin:`lxc-searx.env <utils/lxc-searx.env>`) is loaded by default, every time
you start the ``lxc.sh`` script (*you do not need to care about*).
Before you can start with containers, you need to install and initiate LXD_
once::
$ snap install lxd
$ lxd init --auto
To make use of the containers from the *searx suite*, you have to build the
:ref:`LXC suite containers <lxc.sh help>` initial. But be warned, **this might
take some time**::
$ sudo -H ./utils/lxc.sh build
A cup of coffee later, your LXC suite is build up and you can run whatever task
you want / in a selected or even in all :ref:`LXC suite containers <lxc.sh
help>`. If you do not want to build all containers, **you can build just
one**::
$ sudo -H ./utils/lxc.sh build searx-ubu1804
*Good to know ...*
Eeach container shares the root folder of the repository and the
command ``utils/lxc.sh cmd`` **handles relative path names transparent**,
compare output of::
$ sudo -H ./utils/lxc.sh cmd -- ls -la Makefile
...
In the containers, you can run what ever you want, e.g. to start a bash use::
$ sudo -H ./utils/lxc.sh cmd searx-ubu1804 bash
INFO: [searx-ubu1804] bash
root@searx-ubu1804:/share/searx#
If there comes the time you want to **get rid off all** the containers and
**clean up local images** just type::
$ sudo -H ./utils/lxc.sh remove
$ sudo -H ./utils/lxc.sh remove images
Install suite
=============
To install the complete :ref:`searx suite (includes searx, morty & filtron)
<lxc-searx.env>` into all LXC_ use::
$ sudo -H ./utils/lxc.sh install suite
The command above installs a searx suite (see :ref:`installation scripts`). To
get the IP (URL) of the filtron service in the containers use ``show suite``
command. To test instances from containers just open the URLs in your
WEB-Browser::
$ sudo ./utils/lxc.sh show suite | grep filtron
[searx-ubu1604] INFO: (eth0) filtron: http://n.n.n.246:4004/ http://n.n.n.246/searx
[searx-ubu1804] INFO: (eth0) filtron: http://n.n.n.147:4004/ http://n.n.n.147/searx
[searx-ubu1910] INFO: (eth0) filtron: http://n.n.n.140:4004/ http://n.n.n.140/searx
[searx-ubu2004] INFO: (eth0) filtron: http://n.n.n.18:4004/ http://n.n.n.18/searx
[searx-fedora31] INFO: (eth0) filtron: http://n.n.n.46:4004/ http://n.n.n.46/searx
[searx-archlinux] INFO: (eth0) filtron: http://n.n.n.32:4004/ http://n.n.n.32/searx
To :ref:`install a nginx <installation nginx>` reverse proxy for filtron and
morty use (or alternatively use :ref:`apache <installation apache>`)::
sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/filtron.sh nginx install
sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/morty.sh nginx install
Running commands
================
**Inside containers, you can use make or run scripts** from the
:ref:`toolboxing`. By example: to setup a :ref:`buildhosts` and run the
Makefile target ``test`` in the archlinux_ container::
sudo -H ./utils/lxc.sh cmd searx-archlinux ./utils/searx.sh install buildhost
sudo -H ./utils/lxc.sh cmd searx-archlinux make test
Setup searx buildhost
=====================
You can **install the searx buildhost environment** into one or all containers.
The installation procedure to set up a :ref:`build host<buildhosts>` takes its
time. Installation in all containers will take more time (time for another cup
of coffee).::
sudo -H ./utils/lxc.sh cmd -- ./utils/searx.sh install buildhost
To build (live) documentation inside a archlinux_ container::
sudo -H ./utils/lxc.sh cmd searx-archlinux make docs-clean docs-live
...
[I 200331 15:00:42 server:296] Serving on http://0.0.0.0:8080
To get IP of the container and the port number *live docs* is listening::
$ sudo ./utils/lxc.sh show suite | grep docs-live
...
[searx-archlinux] INFO: (eth0) docs-live: http://n.n.n.12:8080/
.. _lxc.sh help:
Overview
========
The ``--help`` output of the script is largely self-explanatory:
.. program-output:: ../utils/lxc.sh --help
.. _lxc-searx.env:
searx suite
===========
.. literalinclude:: ../../utils/lxc-searx.env
:language: bash

View File

@ -0,0 +1,80 @@
.. _morty: https://github.com/asciimoo/morty
.. _morty's README: https://github.com/asciimoo/morty
.. _Go: https://golang.org/
.. _morty.sh:
==================
``utils/morty.sh``
==================
.. sidebar:: further reading
- :ref:`architecture`
- :ref:`installation` (:ref:`nginx <installation nginx>` & :ref:`apache
<installation apache>`)
- :ref:`searx morty`
To simplify installation and maintenance of a morty_ instance you can use the
script :origin:`utils/morty.sh`. In most cases you will install morty_ simply by
running the command:
.. code:: bash
sudo -H ./utils/morty.sh install all
The script adds a ``${SERVICE_USER}`` (default:``morty``) and installs morty_
into this user account:
#. Create a separated user account (``morty``).
#. Download and install Go_ binary in user's $HOME (``~morty``).
#. Install morty_ with the package management from Go_ (``go get -v -u
github.com/asciimoo/morty``)
#. Setup a systemd service unit :origin:`[ref]
<utils/templates/lib/systemd/system/morty.service>`
(``/lib/systemd/system/morty.service``).
.. hint::
To add morty to your searx instance read chapter :ref:`searx morty`.
Create user
===========
.. kernel-include:: $DOCS_BUILD/includes/morty.rst
:start-after: START create user
:end-before: END create user
Install go
==========
.. kernel-include:: $DOCS_BUILD/includes/morty.rst
:start-after: START install go
:end-before: END install go
Install morty
=============
Install morty software and systemd unit:
.. kernel-include:: $DOCS_BUILD/includes/morty.rst
:start-after: START install morty
:end-before: END install morty
.. kernel-include:: $DOCS_BUILD/includes/morty.rst
:start-after: START install systemd unit
:end-before: END install systemd unit
.. _morty.sh overview:
Overview
========
The ``--help`` output of the script is largely self-explanatory
(:ref:`toolboxing common`):
.. program-output:: ../utils/morty.sh --help

View File

@ -0,0 +1,39 @@
.. _searx.sh:
==================
``utils/searx.sh``
==================
.. sidebar:: further reading
- :ref:`architecture`
- :ref:`installation`
- :ref:`installation nginx`
- :ref:`installation apache`
To simplify installation and maintenance of a searx instance you can use the
script :origin:`utils/searx.sh`.
Install
=======
In most cases you will install searx simply by running the command:
.. code:: bash
sudo -H ./utils/searx.sh install all
The script adds a ``${SERVICE_USER}`` (default:``searx``) and installs searx
into this user account. The installation is described in chapter
:ref:`installation basic`.
.. _intranet reverse proxy:
Overview
========
The ``--help`` output of the script is largely self-explanatory
(:ref:`toolboxing common`):
.. program-output:: ../utils/searx.sh --help

View File

@ -316,22 +316,29 @@ img.align-default, .figure.align-default {
div.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px 7px 0 7px;
padding: 7px;
background-color: #ffe;
width: 40%;
float: right;
clear: right;
overflow-x: auto;
}
p.sidebar-title {
font-weight: bold;
}
div.admonition, div.topic, pre, div[class|="highlight"] {
clear: both;
}
/* -- topics ---------------------------------------------------------------- */
div.topic {
border: 1px solid #ccc;
padding: 7px 7px 0 7px;
padding: 7px;
margin: 10px 0 10px 0;
overflow-x: auto;
}
p.topic-title {
@ -346,16 +353,13 @@ div.admonition {
margin-top: 10px;
margin-bottom: 10px;
padding: 7px;
overflow-x: auto;
}
div.admonition dt {
font-weight: bold;
}
div.admonition dl {
margin-bottom: 0;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
@ -366,9 +370,19 @@ div.body p.centered {
margin-top: 25px;
}
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
/* -- tables ---------------------------------------------------------------- */
table.docutils {
margin-top: 10px;
margin-bottom: 10px;
border: 0;
border-collapse: collapse;
}
@ -416,13 +430,13 @@ table.citation td {
border-bottom: none;
}
th > p:first-child,
td > p:first-child {
th > :first-child,
td > :first-child {
margin-top: 0px;
}
th > p:last-child,
td > p:last-child {
th > :last-child,
td > :last-child {
margin-bottom: 0px;
}
@ -468,6 +482,10 @@ table.field-list td, table.field-list th {
/* -- hlist styles ---------------------------------------------------------- */
table.hlist {
margin: 1em 0;
}
table.hlist td {
vertical-align: top;
}
@ -495,17 +513,34 @@ ol.upperroman {
list-style: upper-roman;
}
li > p:first-child {
ol > li:first-child > :first-child,
ul > li:first-child > :first-child {
margin-top: 0px;
}
li > p:last-child {
ol ol > li:first-child > :first-child,
ol ul > li:first-child > :first-child,
ul ol > li:first-child > :first-child,
ul ul > li:first-child > :first-child {
margin-top: revert;
}
ol > li:last-child > :last-child,
ul > li:last-child > :last-child {
margin-bottom: 0px;
}
ol ol > li:last-child > :last-child,
ol ul > li:last-child > :last-child,
ul ol > li:last-child > :last-child,
ul ul > li:last-child > :last-child {
margin-bottom: revert;
}
dl.footnote > dt,
dl.citation > dt {
float: left;
margin-right: 0.5em;
}
dl.footnote > dd,
@ -546,7 +581,7 @@ dl {
margin-bottom: 15px;
}
dd > p:first-child {
dd > :first-child {
margin-top: 0px;
}
@ -560,6 +595,11 @@ dd {
margin-left: 30px;
}
dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
}
dt:target, span.highlighted {
background-color: #fbe54e;
}
@ -644,22 +684,57 @@ span.pre {
hyphens: none;
}
div[class^="highlight-"] {
margin: 1em 0;
}
td.linenos pre {
padding: 5px 0px;
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
margin-left: 0.5em;
display: block;
}
table.highlighttable tbody {
display: block;
}
table.highlighttable tr {
display: flex;
}
table.highlighttable td {
padding: 0 0.5em 0 0.5em;
margin: 0;
padding: 0;
}
table.highlighttable td.linenos {
padding-right: 0.5em;
}
table.highlighttable td.code {
flex: 1;
overflow: hidden;
}
.highlight .hll {
display: block;
}
div.highlight pre,
table.highlighttable pre {
margin: 0;
}
div.code-block-caption + div {
margin-top: 0;
}
div.code-block-caption {
margin-top: 1em;
padding: 2px 5px;
font-size: small;
}
@ -668,10 +743,7 @@ div.code-block-caption code {
background-color: transparent;
}
div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
}
table.highlighttable td.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
@ -685,11 +757,7 @@ div.code-block-caption span.caption-text {
}
div.literal-block-wrapper {
padding: 1em 1em 0;
}
div.literal-block-wrapper div.highlight {
margin: 0;
margin: 1em 0;
}
code.descname {
@ -740,8 +808,7 @@ span.eqno {
}
span.eqno a.headerlink {
position: relative;
left: 0px;
position: absolute;
z-index: 1;
}

View File

@ -5,6 +5,7 @@ var DOCUMENTATION_OPTIONS = {
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false

File diff suppressed because it is too large Load Diff

4
_static/jquery.js vendored

File diff suppressed because one or more lines are too long

View File

@ -251,6 +251,7 @@ var Search = {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
var requestUrl = "";
var linkUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
// dirhtml builder
var dirname = item[0] + '/';
@ -260,13 +261,15 @@ var Search = {
dirname = '';
}
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
}
listItem.append($('<a/>').attr('href',
requestUrl +
linkUrl +
highlightstring + item[2]).html(item[1]));
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));

View File

@ -33,7 +33,7 @@ p.sidebar-title, .sidebar p {
/* admonitions
*/
div.admonition, div.topic {
div.admonition, div.topic, div.toctree-wrapper {
background-color: #fafafa;
margin: 8px 0px;
padding: 1em;
@ -42,6 +42,16 @@ div.admonition, div.topic {
border-right: none;
border-bottom: none;
border-left: 5pt solid #ccc;
list-style-type: disclosure-closed;
}
div.toctree-wrapper p.caption {
font-weight: normal;
font-size: 24px;
margin: 0 0 10px 0;
padding: 0;
line-height: 1;
display: inline;
}
p.admonition-title:after {
@ -128,3 +138,32 @@ caption {
caption-side: top;
text-align: left;
}
/* bugs since sphinx 3.1
See sphinx-doc project, PR 7838 & 7484 with elementary patch to the basic CSS:
- https://github.com/sphinx-doc/sphinx/issues/7838#issuecomment-646009605
- https://github.com/sphinx-doc/sphinx/pull/7484#issuecomment-646058972
*/
li > p:first-child {
margin-top: 0;
}
li > p:last-child {
margin-bottom: 0;
}
div.admonition dl {
margin-bottom: 0;
}
div.sidebar {
clear: none;
}
div.admonition, div.topic, pre {
clear: none;
}

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Administration API &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="settings.html" title="settings.yml"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Administration API</a></li>
</ul>
</div>
@ -133,6 +135,7 @@ HTML of the site. URL of the searx instance and values are customizable.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -184,7 +187,7 @@ HTML of the site. URL of the searx instance and values are customizable.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Architecture &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="api.html" title="Administration API"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Architecture</a></li>
</ul>
</div>
@ -45,21 +47,27 @@
<div class="section" id="architecture">
<span id="id1"></span><h1>Architecture<a class="headerlink" href="#architecture" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">Needs work!</p>
<p>This article needs some work / Searx is a collaborative effort. If you have
any contribution, feel welcome to send us your <a class="reference external" href="https://github.com/asciimoo/searx/pull/../pulls">PR</a>, see
<a class="reference internal" href="../dev/contribution_guide.html#how-to-contribute"><span class="std std-ref">How to contribute</span></a>.</p>
<p class="sidebar-title">Further reading</p>
<ul class="simple">
<li><p>Reverse Proxy: <a class="reference internal" href="installation-apache.html#apache-searx-site"><span class="std std-ref">Apache</span></a> &amp; <a class="reference internal" href="installation-nginx.html#nginx-searx-site"><span class="std std-ref">nginx</span></a></p></li>
<li><p>Filtron: <a class="reference internal" href="filtron.html#searx-filtron"><span class="std std-ref">How to protect an instance</span></a></p></li>
<li><p>Morty: <a class="reference internal" href="morty.html#searx-morty"><span class="std std-ref">How to setup result proxy</span></a></p></li>
<li><p>uWSGI: <a class="reference internal" href="installation-uwsgi.html#searx-uwsgi"><span class="std std-ref">uwsgi</span></a></p></li>
<li><p>Searx: <a class="reference internal" href="installation-searx.html#installation-basic"><span class="std std-ref">Step by step installation</span></a></p></li>
</ul>
</div>
<p>Herein you will find some hints and suggestions about typical architectures of
searx infrastructures.</p>
<p>We start with a contribution from <a class="reference external" href="https://github.com/asciimoo/searx/pull/1776#issuecomment-567917320">&#64;dalf</a>.
It shows a <em>reference</em> setup for public searx instances.</p>
It shows a <em>reference</em> setup for public searx instances which can build up and
maintained by the scripts from our <a class="reference internal" href="../utils/index.html#toolboxing"><span class="std std-ref">Tooling box utils/*</span></a>.</p>
<div class="figure align-default" id="id2">
<img alt="arch_public.dot" src="../_images/arch_public.svg" /><p class="caption"><span class="caption-number">Fig. 1 </span><span class="caption-text">Reference architecture of a public searx setup.</span><a class="headerlink" href="#id2" title="Permalink to this image"></a></p>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -111,7 +119,7 @@ It shows a <em>reference</em> setup for public searx instances.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Buildhosts &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -39,7 +40,8 @@
<a href="plugins.html" title="Plugins builtin"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Buildhosts</a></li>
</ul>
</div>
@ -55,10 +57,111 @@
<p>If you have any contribution send us your <a class="reference external" href="https://github.com/asciimoo/searx/pull/../pulls">PR</a>, see
<a class="reference internal" href="../dev/contribution_guide.html#how-to-contribute"><span class="std std-ref">How to contribute</span></a>.</p>
</div>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#build-docs" id="id2">Build docs</a></p></li>
<li><p><a class="reference internal" href="#lint-shell-scripts" id="id3">Lint shell scripts</a></p></li>
</ul>
</div>
<p>To get best results from build, its recommend to install additional packages
on build hosts.</p>
on build hosts (see <a class="reference internal" href="../utils/searx.sh.html#searx-sh"><span class="std std-ref">utils/searx.sh</span></a>).:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/searx.sh install buildhost
</pre></div>
</div>
<p>This will install packages needed by searx:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H apt-get install -y <span class="se">\</span>
virtualenv python3-dev python3-babel python3-venv <span class="se">\</span>
uwsgi uwsgi-plugin-python3 <span class="se">\</span>
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev <span class="se">\</span>
shellcheck
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H pacman -S --noconfirm <span class="se">\</span>
python-virtualenv python python-pip python-lxml python-babel <span class="se">\</span>
uwsgi uwsgi-plugin-python <span class="se">\</span>
git base-devel libxml2 <span class="se">\</span>
shellcheck
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H dnf install -y <span class="se">\</span>
virtualenv python python-pip python-lxml python-babel <span class="se">\</span>
uwsgi uwsgi-plugin-python3 <span class="se">\</span>
git @development-tools libxml2 <span class="se">\</span>
ShellCheck
</pre></div>
</div>
</div>
</div>
<p>and packages needed to build docuemtation and run tests:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H apt-get install -y <span class="se">\</span>
firefox graphviz imagemagick texlive-xetex librsvg2-bin <span class="se">\</span>
texlive-latex-recommended texlive-extra-utils ttf-dejavu <span class="se">\</span>
latexmk
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H pacman -S --noconfirm <span class="se">\</span>
firefox graphviz imagemagick texlive-bin extra/librsvg <span class="se">\</span>
texlive-core texlive-latexextra ttf-dejavu
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H dnf install -y <span class="se">\</span>
firefox graphviz graphviz-gd ImageMagick librsvg2-tools <span class="se">\</span>
texlive-xetex-bin texlive-collection-fontsrecommended <span class="se">\</span>
texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts <span class="se">\</span>
dejavu-sans-mono-fonts
</pre></div>
</div>
</div>
</div>
<div class="section" id="build-docs">
<span id="docs-build"></span><h2>Build docs<a class="headerlink" href="#build-docs" title="Permalink to this headline"></a></h2>
<span id="docs-build"></span><h2><a class="toc-backref" href="#id2">Build docs</a><a class="headerlink" href="#build-docs" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">Sphinx build needs</p>
<ul class="simple">
@ -72,9 +175,16 @@ on build hosts.</p>
docs can be build from scratch with <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code>. For better math and image
processing additional packages are needed. The <a class="reference external" href="https://tug.org/xetex/">XeTeX</a> needed not only for PDF
creation, its also needed for <a class="reference internal" href="../dev/reST.html#math"><span class="std std-ref">Math equations</span></a> when HTML output is build.</p>
<p>To be able to do <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/math.html#math-support" title="(in Sphinx v4.0.0+/b1400ac42)"><span>Math support for HTML outputs in Sphinx</span></a> without CDNs, the math are rendered
as images (<code class="docutils literal notranslate"><span class="pre">sphinx.ext.imgmath</span></code> extension). If your docs build (<code class="docutils literal notranslate"><span class="pre">make</span>
<span class="pre">docs</span></code>) shows warnings like this:</p>
<p>To be able to do <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/extensions/math.html#math-support" title="(in Sphinx v4.0.0+)"><span>Math support for HTML outputs in Sphinx</span></a> without CDNs, the math are rendered
as images (<code class="docutils literal notranslate"><span class="pre">sphinx.ext.imgmath</span></code> extension).</p>
<p>Here is the extract from the <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/docs/conf.py">git://docs/conf.py</a> file, setting math renderer
to <code class="docutils literal notranslate"><span class="pre">imgmath</span></code>:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">html_math_renderer</span> <span class="o">=</span> <span class="s1">&#39;imgmath&#39;</span>
<span class="n">imgmath_image_format</span> <span class="o">=</span> <span class="s1">&#39;svg&#39;</span>
<span class="n">imgmath_font_size</span> <span class="o">=</span> <span class="mi">14</span>
</pre></div>
</div>
<p>If your docs build (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span></code>) shows warnings like this:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>WARNING: dot(1) not found, for better output quality install \
graphviz from http://www.graphviz.org
..
@ -84,7 +194,7 @@ WARNING: LaTeX command &#39;latex&#39; cannot be run (needed for math \
</div>
<p>you need to install additional packages on your build host, to get better HTML
output.</p>
<div class="sphinx-tabs docutils container" id="system-requirements">
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
@ -150,20 +260,55 @@ output.</p>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo dnf install <span class="se">\</span>
texlive-collection-fontsrecommended texlive-collection-latex <span class="se">\</span>
dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts
dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts <span class="se">\</span>
ImageMagick
</pre></div>
</div>
</div>
</div>
<div class="highlight-python notranslate" id="system-requirements-end"><div class="highlight"><pre><span></span><span class="n">html_math_renderer</span> <span class="o">=</span> <span class="s1">&#39;imgmath&#39;</span>
<span class="n">imgmath_image_format</span> <span class="o">=</span> <span class="s1">&#39;svg&#39;</span>
<span class="n">imgmath_font_size</span> <span class="o">=</span> <span class="mi">14</span>
</div>
<div class="section" id="lint-shell-scripts">
<span id="sh-lint"></span><h2><a class="toc-backref" href="#id3">Lint shell scripts</a><a class="headerlink" href="#lint-shell-scripts" title="Permalink to this headline"></a></h2>
<p>To lint shell scripts, we use <a class="reference external" href="https://github.com/koalaman/shellcheck">ShellCheck</a> - A shell script static analysis tool.</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo apt install shellcheck
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo pacman -S shellcheck
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo dnf install ShellCheck
</pre></div>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -215,7 +360,7 @@ output.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to protect an instance &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="architecture.html" title="Architecture"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">How to protect an instance</a></li>
</ul>
</div>
@ -43,13 +45,42 @@
<div class="body" role="main">
<div class="section" id="how-to-protect-an-instance">
<h1>How to protect an instance<a class="headerlink" href="#how-to-protect-an-instance" title="Permalink to this headline"></a></h1>
<p>Searx depens on external search services. To avoid the abuse of these services
<span id="searx-filtron"></span><h1>How to protect an instance<a class="headerlink" href="#how-to-protect-an-instance" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">further reading</p>
<ul class="simple">
<li><p><a class="reference internal" href="../utils/filtron.sh.html#filtron-sh"><span class="std std-ref">utils/filtron.sh</span></a></p></li>
<li><p><a class="reference internal" href="installation-nginx.html#nginx-searx-site"><span class="std std-ref">A nginx searx site</span></a></p></li>
</ul>
</div>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#filtron-go" id="id2">filtron &amp; go</a></p></li>
<li><p><a class="reference internal" href="#sample-configuration-of-filtron" id="id3">Sample configuration of filtron</a></p></li>
<li><p><a class="reference internal" href="#route-request-through-filtron" id="id4">Route request through filtron</a></p></li>
</ul>
</div>
<p>Searx depends on external search services. To avoid the abuse of these services
it is advised to limit the number of requests processed by searx.</p>
<p>An application firewall, <code class="docutils literal notranslate"><span class="pre">filtron</span></code> solves exactly this problem. Information
on how to install it can be found at the <a class="reference external" href="https://github.com/asciimoo/filtron">project page of filtron</a>.</p>
<p>An application firewall, <a class="reference external" href="https://github.com/asciimoo/filtron">filtron</a> solves exactly this problem. Filtron is just
a middleware between your web server (nginx, apache, …) and searx, we describe
such infratructures in chapter: <a class="reference internal" href="architecture.html#architecture"><span class="std std-ref">Architecture</span></a>.</p>
<div class="section" id="filtron-go">
<h2><a class="toc-backref" href="#id2">filtron &amp; go</a><a class="headerlink" href="#filtron-go" title="Permalink to this headline"></a></h2>
<p>Filtron needs <a class="reference external" href="https://golang.org/">Go</a> installed. If <a class="reference external" href="https://golang.org/">Go</a> is preinstalled, <a class="reference external" href="https://github.com/asciimoo/filtron">filtron</a> is simply
installed by <code class="docutils literal notranslate"><span class="pre">go</span> <span class="pre">get</span></code> package management (see <a class="reference external" href="https://github.com/asciimoo/filtron/blob/master/README.md">filtron README</a>). If you use
filtron as middleware, a more isolated setup is recommended. To simplify such
an installation and the maintenance of, use our script <a class="reference internal" href="../utils/filtron.sh.html#filtron-sh"><span class="std std-ref">utils/filtron.sh</span></a>.</p>
</div>
<div class="section" id="sample-configuration-of-filtron">
<h2>Sample configuration of filtron<a class="headerlink" href="#sample-configuration-of-filtron" title="Permalink to this headline"></a></h2>
<span id="id1"></span><h2><a class="toc-backref" href="#id3">Sample configuration of filtron</a><a class="headerlink" href="#sample-configuration-of-filtron" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">Tooling box</p>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/asciimoo/searx/blob/master/utils/templates/etc/filtron/rules.json">/etc/filtron/rules.json</a></p></li>
</ul>
</div>
<p>An example configuration can be find below. This configuration limits the access
of:</p>
<ul class="simple">
@ -59,104 +90,104 @@ of:</p>
<li><p>too many json, csv, etc. requests (rss/json limit)</p></li>
<li><p>the same UserAgent of if too many requests (useragent limit)</p></li>
</ul>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">[{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;search request&quot;</span><span class="p">,</span>
<span class="nt">&quot;filters&quot;</span><span class="p">:[</span>
<span class="s2">&quot;Param:q&quot;</span><span class="p">,</span>
<span class="s2">&quot;Path=^(/|/search)$&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;subrules&quot;</span><span class="p">:[</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;roboagent limit&quot;</span><span class="p">,</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;filters&quot;</span><span class="p">:[</span>
<span class="s2">&quot;Header:User-Agent=(curl|cURL|Wget|python-requests|Scrapy|FeedFetcher|Go-http-client)&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:[</span>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">[</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;search request&quot;</span><span class="p">,</span>
<span class="nt">&quot;filters&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;Param:q&quot;</span><span class="p">,</span>
<span class="s2">&quot;Path=^(/|/search)$&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span>
<span class="s2">&quot;limit&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;subrules&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;botlimit&quot;</span><span class="p">,</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">,</span>
<span class="nt">&quot;stop&quot;</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;filters&quot;</span><span class="p">:[</span>
<span class="s2">&quot;Header:User-Agent=(Googlebot|bingbot|Baiduspider|yacybot|YandexMobileBot|YandexBot|Yahoo! Slurp|MJ12bot|AhrefsBot|archive.org_bot|msnbot|MJ12bot|SeznamBot|linkdexbot|Netvibes|SMTBot|zgrab|James BOT)&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:[</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;missing Accept-Language&quot;</span><span class="p">,</span>
<span class="nt">&quot;filters&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;!Header:Accept-Language&quot;</span><span class="p">],</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;stop&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;log&quot;</span><span class="p">},</span>
<span class="p">{</span><span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:</span> <span class="p">{</span><span class="nt">&quot;message&quot;</span><span class="p">:</span> <span class="s2">&quot;Rate limit exceeded&quot;</span><span class="p">}}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;IP limit&quot;</span><span class="p">,</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;stop&quot;</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;aggregations&quot;</span><span class="p">:[</span>
<span class="s2">&quot;Header:X-Forwarded-For&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:[</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;suspiciously Connection=close header&quot;</span><span class="p">,</span>
<span class="nt">&quot;filters&quot;</span><span class="p">:</span> <span class="p">[</span><span class="s2">&quot;Header:Connection=close&quot;</span><span class="p">],</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;stop&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;log&quot;</span><span class="p">},</span>
<span class="p">{</span><span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:</span> <span class="p">{</span><span class="nt">&quot;message&quot;</span><span class="p">:</span> <span class="s2">&quot;Rate limit exceeded&quot;</span><span class="p">}}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;rss/json limit&quot;</span><span class="p">,</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;stop&quot;</span><span class="p">:</span><span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;filters&quot;</span><span class="p">:[</span>
<span class="s2">&quot;Param:format=(csv|json|rss)&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:[</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;IP limit&quot;</span><span class="p">,</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span>
<span class="s2">&quot;limit&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;stop&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;aggregations&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;Header:X-Forwarded-For&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span> <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;log&quot;</span><span class="p">},</span>
<span class="p">{</span> <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span> <span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;useragent limit&quot;</span><span class="p">,</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;limit&quot;</span><span class="p">:</span><span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;aggregations&quot;</span><span class="p">:[</span>
<span class="s2">&quot;Header:User-Agent&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:[</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;rss/json limit&quot;</span><span class="p">,</span>
<span class="nt">&quot;filters&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;Param:format=(csv|json|rss)&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span>
<span class="s2">&quot;limit&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;stop&quot;</span><span class="p">:</span> <span class="kc">true</span><span class="p">,</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span> <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;log&quot;</span><span class="p">},</span>
<span class="p">{</span> <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span> <span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">},</span>
<span class="p">{</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span><span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;useragent limit&quot;</span><span class="p">,</span>
<span class="nt">&quot;interval&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;time-interval-in-sec (int)&gt;&quot;</span>
<span class="s2">&quot;limit&quot;</span><span class="p">:</span> <span class="s2">&quot;&lt;max-request-number-in-interval (int)&gt;&quot;</span><span class="p">,</span>
<span class="nt">&quot;aggregations&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="s2">&quot;Header:User-Agent&quot;</span>
<span class="p">],</span>
<span class="nt">&quot;actions&quot;</span><span class="p">:</span> <span class="p">[</span>
<span class="p">{</span> <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;log&quot;</span><span class="p">},</span>
<span class="p">{</span> <span class="nt">&quot;name&quot;</span><span class="p">:</span> <span class="s2">&quot;block&quot;</span><span class="p">,</span>
<span class="nt">&quot;params&quot;</span><span class="p">:</span> <span class="p">{</span>
<span class="nt">&quot;message&quot;</span><span class="p">:</span> <span class="s2">&quot;Rate limit exceeded&quot;</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">}</span>
<span class="p">]</span>
<span class="p">}]</span>
<span class="p">]</span>
<span class="p">}</span>
<span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="route-request-through-filtron">
<h2>Route request through filtron<a class="headerlink" href="#route-request-through-filtron" title="Permalink to this headline"></a></h2>
<span id="filtron-route-request"></span><h2><a class="toc-backref" href="#id4">Route request through filtron</a><a class="headerlink" href="#route-request-through-filtron" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">further reading</p>
<ul class="simple">
<li><p><a class="reference internal" href="../utils/filtron.sh.html#filtron-sh-overview"><span class="std std-ref">Overview</span></a></p></li>
<li><p><a class="reference internal" href="installation-nginx.html#installation-nginx"><span class="std std-ref">Install with nginx</span></a></p></li>
<li><p><a class="reference internal" href="installation-apache.html#installation-apache"><span class="std std-ref">Install with apache</span></a></p></li>
</ul>
</div>
<p>Filtron can be started using the following command:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ filtron -rules rules.json
</pre></div>
@ -164,21 +195,31 @@ of:</p>
<p>It listens on <code class="docutils literal notranslate"><span class="pre">127.0.0.1:4004</span></code> and forwards filtered requests to
<code class="docutils literal notranslate"><span class="pre">127.0.0.1:8888</span></code> by default.</p>
<p>Use it along with <code class="docutils literal notranslate"><span class="pre">nginx</span></code> with the following example configuration.</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">location</span> <span class="s">/</span> <span class="p">{</span>
<span class="kn">proxy_set_header</span> <span class="s">Host</span> <span class="nv">$http_host</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Real-IP</span> <span class="nv">$remote_addr</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$proxy_add_x_forwarded_for</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Scheme</span> <span class="nv">$scheme</span><span class="p">;</span>
<span class="kn">proxy_pass</span> <span class="s">http://127.0.0.1:4004/</span><span class="p">;</span>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="c1"># https://example.org/searx</span>
<span class="k">location</span> <span class="s">/searx</span> <span class="p">{</span>
<span class="kn">proxy_pass</span> <span class="s">http://127.0.0.1:4004/</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Host</span> <span class="nv">$http_host</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Connection</span> <span class="nv">$http_connection</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Real-IP</span> <span class="nv">$remote_addr</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$proxy_add_x_forwarded_for</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Scheme</span> <span class="nv">$scheme</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Script-Name</span> <span class="s">/searx</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">location</span> <span class="s">/searx/static</span> <span class="p">{</span>
<span class="kn">/usr/local/searx/searx-src/searx/static</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Requests are coming from port 4004 going through filtron and then forwarded to
port 8888 where a searx is being run.</p>
port 8888 where a searx is being run. For a complete setup see: <a class="reference internal" href="installation-nginx.html#nginx-searx-site"><span class="std std-ref">A nginx searx site</span></a>.</p>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -230,7 +271,7 @@ port 8888 where a searx is being run.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Administrator documentation &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -32,7 +33,8 @@
<li class="right" >
<a href="../user/own-instance.html" title="Why use a private instance?"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Administrator documentation</a></li>
</ul>
</div>
@ -44,21 +46,74 @@
<div class="section" id="administrator-documentation">
<h1>Administrator documentation<a class="headerlink" href="#administrator-documentation" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">Contents</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
<li class="toctree-l1"><a class="reference internal" href="api.html">Administration API</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation.html#installation-scripts">Installation scripts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation-searx.html">Step by step installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation-searx.html#install-packages">Install packages</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searx.html#create-user">Create user</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searx.html#install-searx-dependencies">install searx &amp; dependencies</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searx.html#configuration">Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-searx.html#check">Check</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation-uwsgi.html">uwsgi</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html#origin-uwsgi">Origin uWSGI</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html#distributors">Distributors</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-uwsgi.html#alltogether">Alltogether</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation-nginx.html">Install with nginx</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html#the-nginx-http-server">The nginx HTTP server</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html#a-nginx-searx-site">A nginx searx site</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-nginx.html#disable-logs">Disable logs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation-apache.html">Install with apache</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html#the-apache-http-server">The apache HTTP server</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html#apache-reverse-proxy">Apache Reverse Proxy</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html#uwsgi-support">uWSGI support</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html#restart-service">Restart service</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html#disable-logs">disable logs</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation-apache.html#the-debian-layout">The Debian Layout</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation-docker.html">Docker installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="update-searx.html">How to update</a></li>
<li class="toctree-l1"><a class="reference internal" href="settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="settings.html#global-settings">Global Settings</a></li>
<li class="toctree-l2"><a class="reference internal" href="settings.html#engine-settings">Engine settings</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="api.html">Administration API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="api.html#get-configuration-data">Get configuration data</a></li>
<li class="toctree-l2"><a class="reference internal" href="api.html#embed-search-bar">Embed search bar</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="architecture.html">Architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="filtron.html">How to protect an instance</a></li>
<li class="toctree-l1"><a class="reference internal" href="filtron.html">How to protect an instance</a><ul>
<li class="toctree-l2"><a class="reference internal" href="filtron.html#filtron-go">filtron &amp; go</a></li>
<li class="toctree-l2"><a class="reference internal" href="filtron.html#sample-configuration-of-filtron">Sample configuration of filtron</a></li>
<li class="toctree-l2"><a class="reference internal" href="filtron.html#route-request-through-filtron">Route request through filtron</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="morty.html">How to setup result proxy</a></li>
<li class="toctree-l1"><a class="reference internal" href="engines.html">Engines</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins builtin</a></li>
<li class="toctree-l1"><a class="reference internal" href="buildhosts.html">Buildhosts</a></li>
<li class="toctree-l1"><a class="reference internal" href="buildhosts.html">Buildhosts</a><ul>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html#build-docs">Build docs</a></li>
<li class="toctree-l2"><a class="reference internal" href="buildhosts.html#lint-shell-scripts">Lint shell scripts</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -107,7 +162,7 @@
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -0,0 +1,651 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Install with apache &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script src="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
<script src="../_static/sphinx_tabs/tabs.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Docker installation" href="installation-docker.html" />
<link rel="prev" title="Install with nginx" href="installation-nginx.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="installation-docker.html" title="Docker installation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation-nginx.html" title="Install with nginx"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Install with apache</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="install-with-apache">
<span id="installation-apache"></span><h1>Install with apache<a class="headerlink" href="#install-with-apache" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">further read</p>
<ul class="simple">
<li><p><a class="reference external" href="https://wiki.archlinux.org/index.php/Apache_HTTP_Server">Apache Arch Linux</a></p></li>
<li><p><a class="reference external" href="https://cwiki.apache.org/confluence/display/HTTPD/DistrosDefaultLayout#DistrosDefaultLayout-Debian,Ubuntu(Apachehttpd2.x):">Apache Debian</a> and <a class="reference external" href="https://salsa.debian.org/apache-team/apache2/raw/master/debian/apache2.README.Debian">README.Debian</a></p></li>
<li><p><a class="reference external" href="https://docs.fedoraproject.org/en-US/quick-docs/getting-started-with-apache-http-server/index.html">Apache Fedora</a></p></li>
<li><p><a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/directives.html">Apache directives</a></p></li>
</ul>
</div>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#the-apache-http-server" id="id2">The apache HTTP server</a></p></li>
<li><p><a class="reference internal" href="#apache-reverse-proxy" id="id3">Apache Reverse Proxy</a></p></li>
<li><p><a class="reference internal" href="#uwsgi-support" id="id4">uWSGI support</a></p></li>
<li><p><a class="reference internal" href="#restart-service" id="id5">Restart service</a></p></li>
<li><p><a class="reference internal" href="#disable-logs" id="id6">disable logs</a></p></li>
<li><p><a class="reference internal" href="#the-debian-layout" id="id7">The Debian Layout</a></p></li>
</ul>
</div>
<hr class="docutils" />
<p><strong>Install</strong> <a class="reference internal" href="#apache-searx-site"><span class="std std-ref">Apache Reverse Proxy</span></a> using <a class="reference internal" href="../utils/filtron.sh.html#filtron-sh-overview"><span class="std std-ref">filtron.sh</span></a></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/filtron.sh apache install
</pre></div>
</div>
<p><strong>Install</strong> <a class="reference internal" href="#apache-searx-site"><span class="std std-ref">Apache Reverse Proxy</span></a> using <a class="reference internal" href="../utils/morty.sh.html#morty-sh-overview"><span class="std std-ref">morty.sh</span></a></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/morty.sh apache install
</pre></div>
</div>
<hr class="docutils" />
<div class="section" id="the-apache-http-server">
<h2><a class="toc-backref" href="#id2">The apache HTTP server</a><a class="headerlink" href="#the-apache-http-server" title="Permalink to this headline"></a></h2>
<p>If <a class="reference external" href="https://httpd.apache.org/">Apache</a> is not installed, install it now. If <a class="reference external" href="https://httpd.apache.org/">apache</a> is new to you, the
<a class="reference external" href="https://httpd.apache.org/docs/current/en/getting-started.html">Getting Started</a>, <a class="reference external" href="https://httpd.apache.org/docs/current/en/configuring.html">Configuration Files</a> and <a class="reference external" href="https://httpd.apache.org/docs/current/en/mod/directive-dict.html">Terms Used to Describe
Directives</a> documentation gives first orientation. There is also a list of
<a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/directives.html">Apache directives</a> <em>to keep in the pocket</em>.</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H apt-get install apache2
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H pacman -S apache
sudo -H systemctl <span class="nb">enable</span> httpd
sudo -H systemctl start http
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H dnf install httpd
sudo -H systemctl <span class="nb">enable</span> httpd
sudo -H systemctl start httpd
</pre></div>
</div>
</div>
</div>
<p>Now at <a class="reference external" href="http://localhost">http://localhost</a> you should see any kind of <em>Welcome</em> or <em>Test</em> page.
How this default intro site is configured, depends on the linux distribution
(compare <a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/directives.html">Apache directives</a>).</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>less /etc/apache2/sites-enabled/000-default.conf
</pre></div>
</div>
<p>In this file, there is a line setting the <a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/core.html#documentroot">DocumentRoot</a> directive:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">DocumentRoot</span> <span class="sx">/var/www/html</span>
</pre></div>
</div>
<p>And the <em>welcome</em> page is the HTML file at <code class="docutils literal notranslate"><span class="pre">/var/www/html/index.html</span></code>.</p>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>less /etc/httpd/conf/httpd.conf
</pre></div>
</div>
<p>In this file, there is a line setting the <a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/core.html#documentroot">DocumentRoot</a> directive:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">DocumentRoot</span> <span class="s2">&quot;/srv/http&quot;</span>
<span class="nt">&lt;Directory</span> <span class="s">&quot;/srv/http&quot;</span><span class="nt">&gt;</span>
<span class="nb">Options</span> Indexes FollowSymLinks
<span class="nb">AllowOverride</span> <span class="k">None</span>
<span class="nb">Require</span> <span class="k">all</span> granted
<span class="nt">&lt;/Directory&gt;</span>
</pre></div>
</div>
<p>The <em>welcome</em> page of Arch Linux is a page showing directory located at
<code class="docutils literal notranslate"><span class="pre">DocumentRoot</span></code>. This is <em>directory</em> page is generated by the Module
<a class="reference external" href="https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html">mod_autoindex</a>:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">LoadModule</span> autoindex_module modules/mod_autoindex.so
...
<span class="nb">Include</span> conf/extra/httpd-autoindex.conf
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>less /etc/httpd/conf/httpd.conf
</pre></div>
</div>
<p>In this file, there is a line setting the <code class="docutils literal notranslate"><span class="pre">DocumentRoot</span></code> directive:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">DocumentRoot</span> <span class="s2">&quot;/var/www/html&quot;</span>
...
<span class="nt">&lt;Directory</span> <span class="s">&quot;/var/www&quot;</span><span class="nt">&gt;</span>
<span class="nb">AllowOverride</span> <span class="k">None</span>
<span class="c"># Allow open access:</span>
<span class="nb">Require</span> <span class="k">all</span> granted
<span class="nt">&lt;/Directory&gt;</span>
</pre></div>
</div>
<p>On fresh installations, the <code class="docutils literal notranslate"><span class="pre">/var/www</span></code> is empty and the <em>default
welcome page</em> is shown, the configuration is located at:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>less /etc/httpd/conf.d/welcome.conf
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="apache-reverse-proxy">
<span id="apache-searx-site"></span><h2><a class="toc-backref" href="#id3">Apache Reverse Proxy</a><a class="headerlink" href="#apache-reverse-proxy" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">public to the internet?</p>
<p>If your searx instance is public, stop here and first install <a class="reference internal" href="../utils/filtron.sh.html#filtron-sh"><span class="std std-ref">filtron
reverse proxy</span></a> and <a class="reference internal" href="../utils/morty.sh.html#morty-sh"><span class="std std-ref">result proxy morty</span></a>, see
<a class="reference internal" href="installation.html#installation-scripts"><span class="std std-ref">Installation scripts</span></a>. If already done, follow setup: <em>searx via
filtron plus morty</em>.</p>
</div>
<p>To setup a Apache revers proxy you have to enable the <em>headers</em> and <em>proxy</em>
modules and create a <a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/core.html#location">Location</a> configuration for the searx site. In most
distributions you have to un-comment the lines in the main configuration file,
except in <a class="reference internal" href="#the-debian-layout"><span class="std std-ref">The Debian Layout</span></a>.</p>
<p>To pass the HTTP HOST header
With <a class="reference external" href="https://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxypreservehost">ProxyPreserveHost</a> the incoming Host HTTP request header is passed to the
proxied host.</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<p>In the Apache setup, enable headers and proxy modules:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H a2enmod headers
sudo -H a2enmod proxy
sudo -H a2enmod proxy_http
</pre></div>
</div>
<p>In <a class="reference internal" href="#the-debian-layout"><span class="std std-ref">The Debian Layout</span></a> you create a <code class="docutils literal notranslate"><span class="pre">searx.conf</span></code> with the
<code class="docutils literal notranslate"><span class="pre">&lt;Location</span> <span class="pre">/searx</span> <span class="pre">&gt;</span></code> directive and save this file in the <em>sites
available</em> folder at <code class="docutils literal notranslate"><span class="pre">/etc/apache2/sites-available</span></code>. To enable the
<code class="docutils literal notranslate"><span class="pre">searx.conf</span></code> use <a class="reference external" href="https://manpages.debian.org/jump?q=a2ensite">a2ensite</a>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H a2ensite searx.conf
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<p>In the <code class="docutils literal notranslate"><span class="pre">/etc/httpd/conf/httpd.conf</span></code> file, activate headers and proxy
modules (<a class="reference external" href="https://httpd.apache.org/docs/2.4/mod/mod_so.html#loadmodule">LoadModule</a>):</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">FIXME</span> needs test
<span class="nb">LoadModule</span> headers_module modules/mod_headers.so
<span class="nb">LoadModule</span> proxy_module modules/mod_proxy.so
<span class="nb">LoadModule</span> proxy_http_module modules/mod_proxy_http.so
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<p>In the <code class="docutils literal notranslate"><span class="pre">/etc/httpd/conf/httpd.conf</span></code> file, activate headers and proxy
modules (<a class="reference external" href="https://httpd.apache.org/docs/2.4/mod/mod_so.html#loadmodule">LoadModule</a>):</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">FIXME</span> needs test
<span class="nb">LoadModule</span> headers_module modules/mod_headers.so
<span class="nb">LoadModule</span> proxy_module modules/mod_proxy.so
<span class="nb">LoadModule</span> proxy_http_module modules/mod_proxy_http.so
</pre></div>
</div>
</div>
</div>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-c2VhcnggdmlhIGZpbHRyb24gcGx1cyBtb3J0eQ== docutils container">
<div class="docutils container">
<p>searx via filtron plus morty</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-c2VhcnggdmlhIGZpbHRyb24gcGx1cyBtb3J0eQ== active docutils container">
<p>Use this setup, if your instance is public to the internet, compare
figure: <a class="reference internal" href="architecture.html#arch-public"><span class="std std-ref">architecture</span></a> and <a class="reference internal" href="installation.html#installation-scripts"><span class="std std-ref">Installation scripts</span></a>.</p>
<ol class="arabic simple">
<li><p>Configure a reverse proxy for <a class="reference internal" href="../utils/filtron.sh.html#filtron-sh"><span class="std std-ref">filtron</span></a>, listening on
<em>localhost 4004</em> (<a class="reference internal" href="filtron.html#filtron-route-request"><span class="std std-ref">Route request through filtron</span></a>):</p></li>
</ol>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/searx </span><span class="nt">&gt;</span>
<span class="c"># SetEnvIf Request_URI &quot;/searx&quot; dontlog</span>
<span class="c"># CustomLog /dev/null combined env=dontlog</span>
<span class="nb">Require</span> <span class="k">all</span> granted
<span class="nb">Order</span> deny,allow
<span class="nb">Deny</span> from <span class="k">all</span>
<span class="c">#Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1</span>
<span class="nb">Allow</span> from <span class="k">all</span>
<span class="nb">ProxyPreserveHost</span> <span class="k">On</span>
<span class="nb">ProxyPass</span> http://127.0.0.1:4004
<span class="nb">RequestHeader</span> set X-Script-Name <span class="sx">/searx</span>
<span class="nt">&lt;/Location&gt;</span>
</pre></div>
</div>
<p>2. Configure reverse proxy for <a class="reference internal" href="morty.html#searx-morty"><span class="std std-ref">morty</span></a>, listening on
<em>localhost 3000</em></p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">ProxyPreserveHost</span> <span class="k">On</span>
<span class="nt">&lt;Location</span> <span class="s">/morty </span><span class="nt">&gt;</span>
<span class="c"># SetEnvIf Request_URI &quot;/morty&quot; dontlog</span>
<span class="c"># CustomLog /dev/null combined env=dontlog</span>
<span class="nb">Require</span> <span class="k">all</span> granted
<span class="nb">Order</span> deny,allow
<span class="nb">Deny</span> from <span class="k">all</span>
<span class="c">#Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1</span>
<span class="nb">Allow</span> from <span class="k">all</span>
<span class="nb">ProxyPass</span> http://127.0.0.1:3000
<span class="nb">RequestHeader</span> set X-Script-Name <span class="sx">/morty</span>
<span class="nt">&lt;/Location&gt;</span>
</pre></div>
</div>
<p>Note that reverse proxy advised to be used in case of single-user or
low-traffic instances. For a fully result proxification add <a class="reference internal" href="morty.html#searx-morty"><span class="std std-ref">mortys</span></a> <strong>public URL</strong> to your <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a>:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">result_proxy</span><span class="p p-Indicator">:</span>
<span class="c1"># replace example.org with your server&#39;s public name</span>
<span class="l l-Scalar l-Scalar-Plain">url</span> <span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">https://example.org/morty</span>
<span class="l l-Scalar l-Scalar-Plain">server</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">image_proxy</span> <span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">True</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="uwsgi-support">
<h2><a class="toc-backref" href="#id4">uWSGI support</a><a class="headerlink" href="#uwsgi-support" title="Permalink to this headline"></a></h2>
<p>Be warned, with this setup, your instance isnt <a class="reference internal" href="filtron.html#searx-filtron"><span class="std std-ref">protected</span></a>, nevertheless it is good enough for intranet usage. In modern Linux
distributions, the <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-proxy-uwsgi">mod_proxy_uwsgi</a> is compiled into the <em>normal</em> apache
package and you need to install only the <a class="reference internal" href="installation-uwsgi.html#searx-uwsgi"><span class="std std-ref">uWSGI</span></a> package:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H apt-get install uwsgi
<span class="c1"># Ubuntu =&lt; 18.04</span>
sudo -H apt-get install libapache2-mod-proxy-uwsgi
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H pacman -S uwsgi
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H dnf install uwsgi
</pre></div>
</div>
</div>
</div>
<p>The next example shows a configuration using the <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Apache.html">uWSGI Apache support</a> via
unix sockets and <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-proxy-uwsgi">mod_proxy_uwsgi</a>.</p>
<p>For socket communication, you have to activate <code class="docutils literal notranslate"><span class="pre">socket</span> <span class="pre">=</span>
<span class="pre">/run/uwsgi/app/searx/socket</span></code> and comment out the <code class="docutils literal notranslate"><span class="pre">http</span> <span class="pre">=</span> <span class="pre">127.0.0.1:8888</span></code>
configuration in your <a class="reference internal" href="installation-uwsgi.html#uwsgi-configuration"><span class="std std-ref">uwsgi ini file</span></a>. If not
already exists, create a folder for the unix sockets, which can be used by the
searx account (see <a class="reference internal" href="installation-searx.html#create-searx-user"><span class="std std-ref">Create user</span></a>):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo -H mkdir -p /run/uwsgi/app/searx/
sudo -H chown -R searx:searx /run/uwsgi/app/searx/
</pre></div>
</div>
<p>If the server is public; to limit access to your intranet replace <code class="docutils literal notranslate"><span class="pre">Allow</span> <span class="pre">from</span>
<span class="pre">all</span></code> directive and replace <code class="docutils literal notranslate"><span class="pre">192.168.0.0/16</span></code> with your subnet IP/class.</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
<div class="item sphinx-data-tab-b2xkIG1vZF93c2dp docutils container">
<div class="docutils container">
<p>old mod_wsgi</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">LoadModule</span> headers_module <span class="sx">/usr/lib/apache2/mod_headers.so</span>
<span class="nb">LoadModule</span> proxy_module <span class="sx">/usr/lib/apache2/modules/mod_proxy.so</span>
<span class="nb">LoadModule</span> proxy_uwsgi_module <span class="sx">/usr/lib/apache2/modules/mod_proxy_uwsgi.so</span>
<span class="c"># SetEnvIf Request_URI /searx dontlog</span>
<span class="c"># CustomLog /dev/null combined env=dontlog</span>
<span class="nt">&lt;Location</span> <span class="s">/searx</span><span class="nt">&gt;</span>
<span class="nb">Require</span> <span class="k">all</span> granted
<span class="nb">Order</span> deny,allow
<span class="nb">Deny</span> from <span class="k">all</span>
<span class="c"># Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1</span>
<span class="nb">Allow</span> from <span class="k">all</span>
<span class="nb">ProxyPreserveHost</span> <span class="k">On</span>
<span class="nb">ProxyPass</span> unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
<span class="nt">&lt;/Location&gt;</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">FIXME</span> needs test
<span class="nb">LoadModule</span> proxy_module modules/mod_proxy.so
<span class="nb">LoadModule</span> proxy_uwsgi_module modules/mod_proxy_uwsgi.so
<span class="c"># SetEnvIf Request_URI /searx dontlog</span>
<span class="c"># CustomLog /dev/null combined env=dontlog</span>
<span class="nt">&lt;Location</span> <span class="s">/searx</span><span class="nt">&gt;</span>
<span class="nb">Require</span> <span class="k">all</span> granted
<span class="nb">Order</span> deny,allow
<span class="nb">Deny</span> from <span class="k">all</span>
<span class="c"># Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1</span>
<span class="nb">Allow</span> from <span class="k">all</span>
<span class="nb">ProxyPreserveHost</span> <span class="k">On</span>
<span class="nb">ProxyPass</span> unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
<span class="nt">&lt;/Location&gt;</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">FIXME</span> needs test
<span class="nb">LoadModule</span> proxy_module modules/mod_proxy.so
<span class="nb">LoadModule</span> proxy_uwsgi_module modules/mod_proxy_uwsgi.so
<span class="nt">&lt;IfModule</span> <span class="s">proxy_uwsgi_module</span><span class="nt">&gt;</span>
<span class="c"># SetEnvIf Request_URI /searx dontlog</span>
<span class="c"># CustomLog /dev/null combined env=dontlog</span>
<span class="nt">&lt;Location</span> <span class="s">/searx</span><span class="nt">&gt;</span>
<span class="nb">Require</span> <span class="k">all</span> granted
<span class="nb">Order</span> deny,allow
<span class="nb">Deny</span> from <span class="k">all</span>
<span class="c"># Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1</span>
<span class="nb">Allow</span> from <span class="k">all</span>
<span class="nb">ProxyPreserveHost</span> <span class="k">On</span>
<span class="nb">ProxyPass</span> unix:/run/uwsgi/app/searx/socket|uwsgi://uwsgi-uds-searx/
<span class="nt">&lt;/Location&gt;</span>
<span class="nt">&lt;/IfModule&gt;</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-b2xkIG1vZF93c2dp docutils container">
<p>We show this only for historical reasons, DONT USE <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Apache.html#mod-uwsgi">mod_uwsgi</a>.
ANYMORE!</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nt">&lt;IfModule</span> <span class="s">mod_uwsgi.c</span><span class="nt">&gt;</span>
<span class="c"># SetEnvIf Request_URI &quot;/searx&quot; dontlog</span>
<span class="c"># CustomLog /dev/null combined env=dontlog</span>
<span class="nt">&lt;Location</span> <span class="s">/searx </span><span class="nt">&gt;</span>
<span class="nb">Require</span> <span class="k">all</span> granted
<span class="nb">Options</span> FollowSymLinks Indexes
<span class="nb">SetHandler</span> uwsgi-handler
<span class="nb">uWSGISocket</span> <span class="sx">/run/uwsgi/app/searx/socket</span>
<span class="nb">Order</span> deny,allow
<span class="nb">Deny</span> from <span class="k">all</span>
<span class="c"># Allow from fd00::/8 192.168.0.0/16 fe80::/10 127.0.0.0/8 ::1</span>
<span class="nb">Allow</span> from <span class="k">all</span>
<span class="nt">&lt;/Location&gt;</span>
<span class="nt">&lt;/IfModule&gt;</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="restart-service">
<span id="restart-apache"></span><h2><a class="toc-backref" href="#id5">Restart service</a><a class="headerlink" href="#restart-service" title="Permalink to this headline"></a></h2>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H systemctl restart apache2
sudo -H service uwsgi restart searx
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H systemctl restart httpd
sudo -H systemctl restart uwsgi@searx
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H systemctl restart httpd
sudo -H touch /etc/uwsgi.d/searx.ini
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="disable-logs">
<h2><a class="toc-backref" href="#id6">disable logs</a><a class="headerlink" href="#disable-logs" title="Permalink to this headline"></a></h2>
<p>For better privacy you can disable Apache logs. In the examples above activate
one of the lines and <a class="reference internal" href="#restart-apache">restart apache</a>:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span># SetEnvIf Request_URI &quot;/searx&quot; dontlog
# CustomLog /dev/null combined env=dontlog
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">CustomLog</span></code> directive disable logs for the whole (virtual) server, use it
when the URL of the service does not have a path component (<code class="docutils literal notranslate"><span class="pre">/searx</span></code>) / is
located at root (<code class="docutils literal notranslate"><span class="pre">/</span></code>).</p>
</div>
<div class="section" id="the-debian-layout">
<span id="id1"></span><h2><a class="toc-backref" href="#id7">The Debian Layout</a><a class="headerlink" href="#the-debian-layout" title="Permalink to this headline"></a></h2>
<p>Be aware that the Debian layout is quite different from the standard Apache
configuration. For details look at the <a class="reference external" href="https://salsa.debian.org/apache-team/apache2/raw/master/debian/apache2.README.Debian">README.Debian</a>
(<code class="docutils literal notranslate"><span class="pre">/usr/share/doc/apache2/README.Debian.gz</span></code>). Some commands you should know on
Debian:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://manpages.debian.org/jump?q=apache2ctl">apache2ctl</a>: Apache HTTP server control interface</p></li>
<li><p><a class="reference external" href="https://manpages.debian.org/jump?q=a2enmod">a2enmod</a>, <a class="reference external" href="https://manpages.debian.org/jump?q=a2dismod">a2dismod</a>: switch on/off modules</p></li>
<li><p><a class="reference external" href="https://manpages.debian.org/jump?q=a2enconf">a2enconf</a>, <a class="reference external" href="https://manpages.debian.org/jump?q=a2disconf">a2disconf</a>: switch on/off configurations</p></li>
<li><p><a class="reference external" href="https://manpages.debian.org/jump?q=a2ensite">a2ensite</a>, <a class="reference external" href="https://manpages.debian.org/jump?q=a2dissite">a2dissite</a>: switch on/off sites</p></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://searx.space/">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="installation-nginx.html" title="previous chapter">Install with nginx</a>
<li>Next: <a href="installation-docker.html" title="next chapter">Docker installation</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -1,11 +1,12 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>&lt;no title&gt; &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<title>Docker installation &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
@ -15,6 +16,8 @@
<script src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="How to update" href="update-searx.html" />
<link rel="prev" title="Install with apache" href="installation-apache.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
@ -24,7 +27,15 @@
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="right" >
<a href="update-searx.html" title="How to update"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation-apache.html" title="Install with apache"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Docker installation</a></li>
</ul>
</div>
@ -33,9 +44,25 @@
<div class="bodywrapper">
<div class="body" role="main">
<p>This page page has been moved to <a class="reference external" href="https://searx.space/">searx.space</a></p>
<div class="section" id="docker-installation">
<span id="installation-docker"></span><h1>Docker installation<a class="headerlink" href="#docker-installation" title="Permalink to this headline"></a></h1>
<p>Make sure you have installed Docker. For instance, you can deploy searx like this:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker pull wonderfall/searx
docker run -d --name searx -p <span class="nv">$PORT</span>:8888 wonderfall/searx
</pre></div>
</div>
<p>Go to <code class="docutils literal notranslate"><span class="pre">http://localhost:$PORT</span></code>.</p>
<p>See <a class="reference external" href="https://hub.docker.com/r/wonderfall/searx/">https://hub.docker.com/r/wonderfall/searx/</a> for more informations. Its also
possible to build searx from the embedded Dockerfile.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/asciimoo/searx.git
<span class="nb">cd</span> searx
docker build -t whatever/searx .
</pre></div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -61,7 +88,13 @@
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="installation-apache.html" title="previous chapter">Install with apache</a>
<li>Next: <a href="update-searx.html" title="next chapter">How to update</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
@ -81,7 +114,7 @@
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -0,0 +1,508 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Install with nginx &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script src="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
<script src="../_static/sphinx_tabs/tabs.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Install with apache" href="installation-apache.html" />
<link rel="prev" title="uwsgi" href="installation-uwsgi.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="installation-apache.html" title="Install with apache"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation-uwsgi.html" title="uwsgi"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Install with nginx</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="install-with-nginx">
<span id="installation-nginx"></span><h1>Install with nginx<a class="headerlink" href="#install-with-nginx" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">further reading</p>
<ul class="simple">
<li><p><a class="reference external" href="https://docs.nginx.com/nginx/admin-guide/">nginx</a></p></li>
<li><p><a class="reference external" href="http://nginx.org/en/docs/beginners_guide.html">nginx beginners guide</a></p></li>
<li><p><a class="reference external" href="https://docs.nginx.com/nginx/admin-guide/web-server/web-server/#setting-up-virtual-servers">nginx server configuration</a></p></li>
<li><p><a class="reference external" href="https://www.nginx.com/resources/wiki/start/">Getting Started wiki</a></p></li>
<li><p><a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html">uWSGI support from nginx</a></p></li>
</ul>
</div>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#the-nginx-http-server" id="id1">The nginx HTTP server</a></p></li>
<li><p><a class="reference internal" href="#a-nginx-searx-site" id="id2">A nginx searx site</a></p></li>
<li><p><a class="reference internal" href="#disable-logs" id="id3">Disable logs</a></p></li>
</ul>
</div>
<hr class="docutils" />
<p><strong>Install</strong> <a class="reference internal" href="#nginx-searx-site"><span class="std std-ref">A nginx searx site</span></a> using <a class="reference internal" href="../utils/filtron.sh.html#filtron-sh-overview"><span class="std std-ref">filtron.sh</span></a></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/filtron.sh nginx install
</pre></div>
</div>
<p><strong>Install</strong> <a class="reference internal" href="#nginx-searx-site"><span class="std std-ref">A nginx searx site</span></a> using <a class="reference internal" href="../utils/morty.sh.html#morty-sh-overview"><span class="std std-ref">morty.sh</span></a></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/morty.sh nginx install
</pre></div>
</div>
<hr class="docutils" />
<div class="section" id="the-nginx-http-server">
<h2><a class="toc-backref" href="#id1">The nginx HTTP server</a><a class="headerlink" href="#the-nginx-http-server" title="Permalink to this headline"></a></h2>
<p>If <a class="reference external" href="https://docs.nginx.com/nginx/admin-guide/">nginx</a> is not installed (uwsgi will not work with the package nginx-light),
install it now.</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H apt-get install nginx
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H pacman -S nginx-mainline
sudo -H systemctl <span class="nb">enable</span> nginx
sudo -H systemctl start nginx
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H dnf install nginx
sudo -H systemctl <span class="nb">enable</span> nginx
sudo -H systemctl start nginx
</pre></div>
</div>
</div>
</div>
<p>Now at <a class="reference external" href="http://localhost">http://localhost</a> you should see a <em>Welcome to nginx!</em> page, on Fedora you
see a <em>Fedora Webserver - Test Page</em>. The test page comes from the default
<a class="reference external" href="https://docs.nginx.com/nginx/admin-guide/web-server/web-server/#setting-up-virtual-servers">nginx server configuration</a>. How this default intro site is configured,
depends on the linux distribution:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>less /etc/nginx/nginx.conf
</pre></div>
</div>
<p>there is a line including site configurations from:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">include</span> <span class="n">/etc/nginx/sites-enabled/*</span>;
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>less /etc/nginx/nginx.conf
</pre></div>
</div>
<p>in there is a configuration section named <code class="docutils literal notranslate"><span class="pre">server</span></code>:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">server</span> <span class="p">{</span>
<span class="kn">listen</span> <span class="mi">80</span><span class="p">;</span>
<span class="kn">server_name</span> <span class="s">localhost</span><span class="p">;</span>
<span class="c1"># ...</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>less /etc/nginx/nginx.conf
</pre></div>
</div>
<p>there is a line including site configurations from:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">include</span> <span class="n">/etc/nginx/conf.d/*.conf</span>;
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="a-nginx-searx-site">
<span id="nginx-searx-site"></span><h2><a class="toc-backref" href="#id2">A nginx searx site</a><a class="headerlink" href="#a-nginx-searx-site" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">public to the internet?</p>
<p>If your searx instance is public, stop here and first install <a class="reference internal" href="../utils/filtron.sh.html#filtron-sh"><span class="std std-ref">filtron
reverse proxy</span></a> and <a class="reference internal" href="../utils/morty.sh.html#morty-sh"><span class="std std-ref">result proxy morty</span></a>, see
<a class="reference internal" href="installation.html#installation-scripts"><span class="std std-ref">Installation scripts</span></a>. If already done, follow setup: <em>searx via
filtron plus morty</em>.</p>
</div>
<p>Now you have to create a configuration for the searx site. If <a class="reference external" href="https://docs.nginx.com/nginx/admin-guide/">nginx</a> is new to
you, the <a class="reference external" href="http://nginx.org/en/docs/beginners_guide.html">nginx beginners guide</a> is a good starting point and the <a class="reference external" href="https://www.nginx.com/resources/wiki/start/">Getting
Started wiki</a> is always a good resource <em>to keep in the pocket</em>.</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<p>Create configuration at <code class="docutils literal notranslate"><span class="pre">/etc/nginx/sites-available/searx</span></code> and place a
symlink to sites-enabled:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<p>In the <code class="docutils literal notranslate"><span class="pre">/etc/nginx/nginx.conf</span></code> file, replace the configuration section
named <code class="docutils literal notranslate"><span class="pre">server</span></code>.</p>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<p>Create configuration at <code class="docutils literal notranslate"><span class="pre">/etc/nginx/conf.d/searx</span></code> and place a
symlink to sites-enabled:</p>
</div>
</div>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-c2VhcnggdmlhIGZpbHRyb24gcGx1cyBtb3J0eQ== docutils container">
<div class="docutils container">
<p>searx via filtron plus morty</p>
</div>
</div>
<div class="item sphinx-data-tab-cHJveHkgb3IgdVdTR0k= docutils container">
<div class="docutils container">
<p>proxy or uWSGI</p>
</div>
</div>
<div class="item sphinx-data-tab-XC5cLiBhdCBzdWJkaXIgVVJM docutils container">
<div class="docutils container">
<p>.. at subdir URL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-c2VhcnggdmlhIGZpbHRyb24gcGx1cyBtb3J0eQ== active docutils container">
<p>Use this setup, if your instance is public to the internet, compare
figure: <a class="reference internal" href="architecture.html#arch-public"><span class="std std-ref">architecture</span></a> and <a class="reference internal" href="installation.html#installation-scripts"><span class="std std-ref">Installation scripts</span></a>.</p>
<ol class="arabic simple">
<li><p>Configure a reverse proxy for <a class="reference internal" href="../utils/filtron.sh.html#filtron-sh"><span class="std std-ref">filtron</span></a>, listening on
<em>localhost 4004</em> (<a class="reference internal" href="filtron.html#filtron-route-request"><span class="std std-ref">Route request through filtron</span></a>):</p></li>
</ol>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="c1"># https://example.org/searx</span>
<span class="k">location</span> <span class="s">/searx</span> <span class="p">{</span>
<span class="kn">proxy_pass</span> <span class="s">http://127.0.0.1:4004/</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Host</span> <span class="nv">$http_host</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Connection</span> <span class="nv">$http_connection</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Real-IP</span> <span class="nv">$remote_addr</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$proxy_add_x_forwarded_for</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Scheme</span> <span class="nv">$scheme</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Script-Name</span> <span class="s">/searx</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">location</span> <span class="s">/searx/static</span> <span class="p">{</span>
<span class="kn">/usr/local/searx/searx-src/searx/static</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<ol class="arabic simple" start="2">
<li><p>Configure reverse proxy for <a class="reference internal" href="morty.html#searx-morty"><span class="std std-ref">morty</span></a>, listening on
<em>localhost 3000</em>:</p></li>
</ol>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="c1"># https://example.org/morty</span>
<span class="k">location</span> <span class="s">/morty</span> <span class="p">{</span>
<span class="kn">proxy_pass</span> <span class="s">http://127.0.0.1:3000/</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Host</span> <span class="nv">$http_host</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Connection</span> <span class="nv">$http_connection</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Real-IP</span> <span class="nv">$remote_addr</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$proxy_add_x_forwarded_for</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Scheme</span> <span class="nv">$scheme</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Note that reverse proxy advised to be used in case of single-user or
low-traffic instances. For a fully result proxification add <a class="reference internal" href="morty.html#searx-morty"><span class="std std-ref">mortys</span></a> <strong>public URL</strong> to your <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a>:</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">result_proxy</span><span class="p p-Indicator">:</span>
<span class="c1"># replace example.org with your server&#39;s public name</span>
<span class="l l-Scalar l-Scalar-Plain">url</span> <span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">https://example.org/morty</span>
<span class="l l-Scalar l-Scalar-Plain">server</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">image_proxy</span> <span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">True</span>
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-cHJveHkgb3IgdVdTR0k= docutils container">
<p>Be warned, with this setup, your instance isnt <a class="reference internal" href="filtron.html#searx-filtron"><span class="std std-ref">protected</span></a>. Nevertheless it is good enough for intranet usage and it is a
excellent example of; <em>how different services can be set up</em>. The next
example shows a reverse proxy configuration wrapping the <a class="reference internal" href="installation-uwsgi.html#uwsgi-configuration"><span class="std std-ref">searx-uWSGI
application</span></a>, listening on <code class="docutils literal notranslate"><span class="pre">http</span> <span class="pre">=</span>
<span class="pre">127.0.0.1:8888</span></code>.</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="c1"># https://hostname.local/</span>
<span class="k">location</span> <span class="s">/</span> <span class="p">{</span>
<span class="kn">proxy_pass</span> <span class="s">http://127.0.0.1:8888</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Host</span> <span class="nv">$host</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Connection</span> <span class="nv">$http_connection</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$proxy_add_x_forwarded_for</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Scheme</span> <span class="nv">$scheme</span><span class="p">;</span>
<span class="kn">proxy_buffering</span> <span class="no">off</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Alternatively you can use the <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html">uWSGI support from nginx</a> via unix
sockets. For socket communication, you have to activate <code class="docutils literal notranslate"><span class="pre">socket</span> <span class="pre">=</span>
<span class="pre">/run/uwsgi/app/searx/socket</span></code> and comment out the <code class="docutils literal notranslate"><span class="pre">http</span> <span class="pre">=</span>
<span class="pre">127.0.0.1:8888</span></code> configuration in your <a class="reference internal" href="installation-uwsgi.html#uwsgi-configuration"><span class="std std-ref">uwsgi ini file</span></a>.</p>
<p>The example shows a nginx virtual <code class="docutils literal notranslate"><span class="pre">server</span></code> configuration, listening on
port 80 (IPv4 and IPv6 <a class="reference external" href="http://[::]:80">http://[::]:80</a>). The uWSGI app is configured at
location <code class="docutils literal notranslate"><span class="pre">/</span></code> by importing the <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html#configuring-nginx">uwsgi_params</a> and passing requests to
the uWSGI socket (<code class="docutils literal notranslate"><span class="pre">uwsgi_pass</span></code>). The <code class="docutils literal notranslate"><span class="pre">server</span></code>'s root points to the
<a class="reference internal" href="installation-searx.html#searx-src"><span class="std std-ref">searx-src clone</span></a> and wraps directly the
<a class="reference external" href="https://github.com/asciimoo/searx/blob/master/searx/static/">git://searx/static/</a> content at <code class="docutils literal notranslate"><span class="pre">location</span> <span class="pre">/static</span></code>.</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">server</span> <span class="p">{</span>
<span class="c1"># replace hostname.local with your server&#39;s name</span>
<span class="kn">server_name</span> <span class="s">hostname.local</span><span class="p">;</span>
<span class="kn">listen</span> <span class="mi">80</span><span class="p">;</span>
<span class="kn">listen</span> <span class="s">[::]:80</span><span class="p">;</span>
<span class="kn">location</span> <span class="s">/</span> <span class="p">{</span>
<span class="kn">include</span> <span class="s">uwsgi_params</span><span class="p">;</span>
<span class="kn">uwsgi_pass</span> <span class="s">unix:/run/uwsgi/app/searx/socket</span><span class="p">;</span>
<span class="p">}</span>
<span class="kn">root</span> <span class="s">/usr/local/searx/searx-src/searx</span><span class="p">;</span>
<span class="kn">location</span> <span class="s">/static</span> <span class="p">{</span> <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>If not already exists, create a folder for the unix sockets, which can be
used by the searx account:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>mkdir -p /run/uwsgi/app/searx/
sudo -H chown -R searx:searx /run/uwsgi/app/searx/
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-XC5cLiBhdCBzdWJkaXIgVVJM docutils container">
<p>Be warned, with these setups, your instance isnt <a class="reference internal" href="filtron.html#searx-filtron"><span class="std std-ref">protected</span></a>. The examples are just here to demonstrate how to export the
searx application from a subdirectory URL <code class="docutils literal notranslate"><span class="pre">https://example.org/searx/</span></code>.</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="c1"># https://hostname.local/searx</span>
<span class="k">location</span> <span class="s">/searx</span> <span class="p">{</span>
<span class="kn">proxy_pass</span> <span class="s">http://127.0.0.1:8888</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Host</span> <span class="nv">$host</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Connection</span> <span class="nv">$http_connection</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$proxy_add_x_forwarded_for</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Scheme</span> <span class="nv">$scheme</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Script-Name</span> <span class="s">/searx</span><span class="p">;</span>
<span class="kn">proxy_buffering</span> <span class="no">off</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">location</span> <span class="s">/searx/static</span> <span class="p">{</span>
<span class="kn">alias</span> <span class="s">/usr/local/searx/searx-src/searx/static</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">X-Script-Name</span> <span class="pre">/searx</span></code> is needed by the searx implementation to
calculate relative URLs correct. The next example shows a uWSGI
configuration. Since there are no HTTP headers in a (u)WSGI protocol, the
value is shipped via the <a class="reference external" href="https://werkzeug.palletsprojects.com/en/1.0.x/wsgi/#werkzeug.wsgi.get_script_name">SCRIPT_NAME</a> in the WSGI environment.</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="c1"># https://hostname.local/searx</span>
<span class="k">location</span> <span class="s">/searx</span> <span class="p">{</span>
<span class="kn">uwsgi_param</span> <span class="s">SCRIPT_NAME</span> <span class="s">/searx</span><span class="p">;</span>
<span class="kn">include</span> <span class="s">uwsgi_params</span><span class="p">;</span>
<span class="kn">uwsgi_pass</span> <span class="s">unix:/run/uwsgi/app/searx/socket</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">location</span> <span class="s">/searx/static</span> <span class="p">{</span>
<span class="kn">alias</span> <span class="s">/usr/local/searx/searx-src/searx</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>For searx to work correctly the <code class="docutils literal notranslate"><span class="pre">base_url</span></code> must be set in the
<a class="reference external" href="https://github.com/asciimoo/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a>.</p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">server</span><span class="p p-Indicator">:</span>
<span class="c1"># replace example.org with your server&#39;s public name</span>
<span class="l l-Scalar l-Scalar-Plain">base_url</span> <span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">https://example.org/searx/</span>
</pre></div>
</div>
</div>
</div>
<p>Restart service:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3Jh docutils container">
<div class="docutils container">
<p>Fedora</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H systemctl restart nginx
sudo -H service uwsgi restart searx
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H systemctl restart nginx
sudo -H systemctl restart uwsgi@searx
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3Jh docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H systemctl restart nginx
sudo -H touch /etc/uwsgi.d/searx.ini
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="disable-logs">
<h2><a class="toc-backref" href="#id3">Disable logs</a><a class="headerlink" href="#disable-logs" title="Permalink to this headline"></a></h2>
<p>For better privacy you can disable nginx logs in <code class="docutils literal notranslate"><span class="pre">/etc/nginx/nginx.conf</span></code>.</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">http</span> <span class="p">{</span>
<span class="c1"># ...</span>
<span class="kn">access_log</span> <span class="s">/dev/null</span><span class="p">;</span>
<span class="kn">error_log</span> <span class="s">/dev/null</span><span class="p">;</span>
<span class="c1"># ...</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://searx.space/">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="installation-uwsgi.html" title="previous chapter">uwsgi</a>
<li>Next: <a href="installation-apache.html" title="next chapter">Install with apache</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -0,0 +1,367 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Step by step installation &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script src="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
<script src="../_static/sphinx_tabs/tabs.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="uwsgi" href="installation-uwsgi.html" />
<link rel="prev" title="Installation" href="installation.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="installation-uwsgi.html" title="uwsgi"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation.html" title="Installation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Step by step installation</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="step-by-step-installation">
<span id="installation-basic"></span><h1>Step by step installation<a class="headerlink" href="#step-by-step-installation" title="Permalink to this headline"></a></h1>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#install-packages" id="id2">Install packages</a></p></li>
<li><p><a class="reference internal" href="#create-user" id="id3">Create user</a></p></li>
<li><p><a class="reference internal" href="#install-searx-dependencies" id="id4">install searx &amp; dependencies</a></p></li>
<li><p><a class="reference internal" href="#configuration" id="id5">Configuration</a></p></li>
<li><p><a class="reference internal" href="#check" id="id6">Check</a></p></li>
</ul>
</div>
<p>Step by step installation with virtualenv. For Ubuntu, be sure to have enable
universe repository.</p>
<div class="section" id="install-packages">
<span id="id1"></span><h2><a class="toc-backref" href="#id2">Install packages</a><a class="headerlink" href="#install-packages" title="Permalink to this headline"></a></h2>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H apt-get install -y <span class="se">\</span>
virtualenv python3-dev python3-babel python3-venv <span class="se">\</span>
uwsgi uwsgi-plugin-python3 <span class="se">\</span>
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev <span class="se">\</span>
shellcheck
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H pacman -S --noconfirm <span class="se">\</span>
python-virtualenv python python-pip python-lxml python-babel <span class="se">\</span>
uwsgi uwsgi-plugin-python <span class="se">\</span>
git base-devel libxml2 <span class="se">\</span>
shellcheck
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H dnf install -y <span class="se">\</span>
virtualenv python python-pip python-lxml python-babel <span class="se">\</span>
uwsgi uwsgi-plugin-python3 <span class="se">\</span>
git @development-tools libxml2 <span class="se">\</span>
ShellCheck
</pre></div>
</div>
</div>
</div>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>This installs also the packages needed by <a class="reference internal" href="installation-uwsgi.html#searx-uwsgi"><span class="std std-ref">uwsgi</span></a></p>
</div>
</div>
<div class="section" id="create-user">
<span id="create-searx-user"></span><h2><a class="toc-backref" href="#id3">Create user</a><a class="headerlink" href="#create-user" title="Permalink to this headline"></a></h2>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
<div class="docutils container">
<p>bash</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H useradd --shell /bin/bash --system <span class="se">\</span>
--home-dir /usr/local/searx <span class="se">\</span>
--comment Privacy-respecting metasearch engine searx
$ sudo -H mkdir /usr/local/searx
$ sudo -H chown -R searx:searx /usr/local/searx
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="install-searx-dependencies">
<span id="searx-src"></span><h2><a class="toc-backref" href="#id4">install searx &amp; dependencies</a><a class="headerlink" href="#install-searx-dependencies" title="Permalink to this headline"></a></h2>
<p>Start a interactive shell from new created user and clone searx:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
<div class="docutils container">
<p>bash</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H -u searx -i
<span class="o">(</span>searx<span class="o">)</span>$ git clone https://github.com/asciimoo/searx.git /usr/local/searx/searx-src
</pre></div>
</div>
</div>
</div>
<p>In the same shell create <em>virtualenv</em>:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
<div class="docutils container">
<p>bash</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="o">(</span>searx<span class="o">)</span>$ python3 -m venv /usr/local/searx/searx-pyenv
<span class="o">(</span>searx<span class="o">)</span>$ <span class="nb">echo</span> . /usr/local/searx/searx-pyenv/bin/activate &gt;&gt; /usr/local/searx/.profile
</pre></div>
</div>
</div>
</div>
<p>To install searxs dependencies, exit the searx <em>bash</em> session you opened above
and restart a new. Before install, first check if your <em>virualenv</em> was sourced
from the login (<em>~/.profile</em>):</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
<div class="docutils container">
<p>bash</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H -u searx -i
<span class="o">(</span>searx<span class="o">)</span>$ <span class="nb">command</span> -v python <span class="o">&amp;&amp;</span> python --version
/usr/local/searx/searx-pyenv/bin/python
Python 3.8.1
<span class="c1"># update pip&#39;s boilerplate ..</span>
pip install -U pip
pip install -U setuptools
pip install -U wheel
<span class="c1"># jump to searx&#39;s working tree and install searx into virtualenv</span>
<span class="o">(</span>searx<span class="o">)</span>$ <span class="nb">cd</span> /usr/local/searx/searx-src
<span class="o">(</span>searx<span class="o">)</span>$ pip install -e .
</pre></div>
</div>
</div>
</div>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>Open a second terminal for the configuration tasks and left the <code class="docutils literal notranslate"><span class="pre">(searx)$</span></code>
terminal open for the tasks below.</p>
</div>
</div>
<div class="section" id="configuration">
<h2><a class="toc-backref" href="#id5">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h2>
<p>Create a copy of the <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a> configuration file in systems
<em>/etc</em> folder. Configure like shown below replace <code class="docutils literal notranslate"><span class="pre">searx&#64;\$(uname</span> <span class="pre">-n)</span></code> with
a name of your choice <em>and/or</em> edit <code class="docutils literal notranslate"><span class="pre">/etc/searx/settings.yml</span></code> if necessary.</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
<div class="docutils container">
<p>bash</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H cp /usr/local/searx/searx-src/searx/settings.yml /etc/searx/settings.yml
$ sudo -H sed -i -e s/ultrasecretkey/<span class="se">\1</span>0f5827a1c699bdc92caa3c0e921a6cd/g /etc/searx/settings.yml
$ sudo -H sed -i -e s/<span class="o">{</span>instance_name<span class="o">}</span>/searx@<span class="se">\r</span>yzen/g /etc/searx/settings.yml
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="check">
<h2><a class="toc-backref" href="#id6">Check</a><a class="headerlink" href="#check" title="Permalink to this headline"></a></h2>
<p>To check your searx setup, optional enable debugging and start the <em>webapp</em>.
Searx looks at the exported environment <code class="docutils literal notranslate"><span class="pre">$SEARX_SETTINGS_PATH</span></code> for a
configuration file.</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
<div class="docutils container">
<p>bash</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="c1"># enable debug ..</span>
$ sudo -H sed -i -e s/debug : False/debug : True/g /etc/searx/settings.yml
<span class="c1"># start webapp</span>
$ sudo -H -u searx -i
<span class="o">(</span>searx<span class="o">)</span>$ <span class="nb">cd</span> /usr/local/searx/searx-src
<span class="o">(</span>searx<span class="o">)</span>$ <span class="nb">export</span> <span class="nv">SEARX_SETTINGS_PATH</span><span class="o">=</span>/etc/searx/settings.yml
<span class="o">(</span>searx<span class="o">)</span>$ python searx/webapp.py
<span class="c1"># disable debug</span>
$ sudo -H sed -i -e s/debug : True/debug : False/g /etc/searx/settings.yml
</pre></div>
</div>
</div>
</div>
<p>Open WEB browser and visit <a class="reference external" href="http://">http://</a> . If you are inside a
container or in a script, test with curl:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-V0VCIGJyb3dzZXI= docutils container">
<div class="docutils container">
<p>WEB browser</p>
</div>
</div>
<div class="item sphinx-data-tab-Y3VybA== docutils container">
<div class="docutils container">
<p>curl</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-V0VCIGJyb3dzZXI= active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ xgd-open http://
</pre></div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-Y3VybA== docutils container">
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ curl --location --verbose --head --insecure
* Trying 127.0.0.1:8888...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8888 (#0)
&gt; HEAD / HTTP/1.1
&gt; Host: 127.0.0.1:8888
&gt; User-Agent: curl/7.68.0
&gt; Accept: */*
&gt;
* Mark bundle as not supporting multiuse
* HTTP 1.0, assume close after body
&lt; HTTP/1.0 200 OK
HTTP/1.0 200 OK
...
</pre></div>
</div>
</div>
</div>
<p>If everything works fine, hit <code class="docutils literal notranslate"><span class="pre">[CTRL-C]</span></code> to stop the <em>webapp</em> and disable the
debug option in <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code>. You can now exit searx user bash (enter exit
command twice). At this point searx is not demonized; uwsgi allows this.</p>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://searx.space/">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="installation.html" title="previous chapter">Installation</a>
<li>Next: <a href="installation-uwsgi.html" title="next chapter">uwsgi</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -0,0 +1,517 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>uwsgi &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script src="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
<script src="../_static/sphinx_tabs/tabs.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Install with nginx" href="installation-nginx.html" />
<link rel="prev" title="Step by step installation" href="installation-searx.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="installation-nginx.html" title="Install with nginx"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation-searx.html" title="Step by step installation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">uwsgi</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="uwsgi">
<span id="searx-uwsgi"></span><h1>uwsgi<a class="headerlink" href="#uwsgi" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">further reading</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.freedesktop.org/software/systemd/man/systemd.unit.html">systemd.unit</a></p></li>
<li><p><a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html">uWSGI Emperor</a></p></li>
</ul>
</div>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#origin-uwsgi" id="id1">Origin uWSGI</a></p></li>
<li><p><a class="reference internal" href="#distributors" id="id2">Distributors</a></p></li>
<li><p><a class="reference internal" href="#alltogether" id="id3">Alltogether</a></p></li>
</ul>
</div>
<div class="section" id="origin-uwsgi">
<h2><a class="toc-backref" href="#id1">Origin uWSGI</a><a class="headerlink" href="#origin-uwsgi" title="Permalink to this headline"></a></h2>
<p>How uWSGI is implemented by distributors is different. uWSGI itself
recommend two methods</p>
<p><a class="reference external" href="https://www.freedesktop.org/software/systemd/man/systemd.unit.html">systemd.unit</a> template files as described here <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd">One service per app in systemd</a>.</p>
<blockquote>
<div><p>There is one <a class="reference external" href="http://0pointer.de/blog/projects/instances.html">systemd unit template</a> and one <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#ini-files">uwsgi ini file</a> per uWSGI-app
placed at dedicated locations. Take archlinux and a searx.ini as example:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>unit template --&gt; /usr/lib/systemd/system/uwsgi@.service
uwsgi ini files --&gt; /etc/uwsgi/searx.ini
</pre></div>
</div>
<p>The searx app can be maintained as know from common systemd units:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>systemctl enable uwsgi@searx
systemctl start uwsgi@searx
systemctl restart uwsgi@searx
systemctl stop uwsgi@searx
</pre></div>
</div>
</div></blockquote>
<p>The <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html">uWSGI Emperor</a> mode which fits for maintaining a large range of uwsgi apps.</p>
<blockquote>
<div><p>The Emperor mode is a special uWSGI instance that will monitor specific
events. The Emperor mode (service) is started by a (common, not template)
systemd unit. The Emperor service will scan specific directories for <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#ini-files">uwsgi
ini file</a>s (also know as <em>vassals</em>). If a <em>vassal</em> is added, removed or the
timestamp is modified, a corresponding action takes place: a new uWSGI
instance is started, reload or stopped. Take Fedora and a searx.ini as
example:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>to start a new searx instance create --&gt; /etc/uwsgi.d/searx.ini
to reload the instance edit timestamp --&gt; touch /etc/uwsgi.d/searx.ini
to stop instance remove ini --&gt; rm /etc/uwsgi.d/searx.ini
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="distributors">
<h2><a class="toc-backref" href="#id2">Distributors</a><a class="headerlink" href="#distributors" title="Permalink to this headline"></a></h2>
<p>The <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html">uWSGI Emperor</a> mode and <a class="reference external" href="http://0pointer.de/blog/projects/instances.html">systemd unit template</a> is what the distributors
mostly offer their users, even if they differ in the way they implement both
modes and their defaults. Another point they might differ is the packaging of
plugins (if so, compare <a class="reference internal" href="installation-searx.html#install-packages"><span class="std std-ref">Install packages</span></a>) and what the default python
interpreter is (python2 vs. python3).</p>
<p>Fedora starts a Emperor by default, while archlinux does not start any uwsgi
service by default. Worth to know; debian (ubuntu) follow a complete different
approach. <em>debian</em>: your are familiar with the apache infrastructure? .. they
do similar for the uWSGI infrastructure (with less comfort), the folders are:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>/etc/uwsgi/apps-available/
/etc/uwsgi/apps-enabled/
</pre></div>
</div>
<p>The <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#ini-files">uwsgi ini file</a> is enabled by a symbolic link:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>ln -s /etc/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-enabled/
</pre></div>
</div>
<p>From debians documentation (<code class="docutils literal notranslate"><span class="pre">/usr/share/doc/uwsgi/README.Debian.gz</span></code>): You
could control specific instance(s) by issuing:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>service uwsgi &lt;command&gt; &lt;confname&gt; &lt;confname&gt; ...
sudo -H service uwsgi start searx
sudo -H service uwsgi stop searx
</pre></div>
</div>
<p>My experience is, that this command is a bit buggy.</p>
</div>
<div class="section" id="alltogether">
<span id="uwsgi-configuration"></span><h2><a class="toc-backref" href="#id3">Alltogether</a><a class="headerlink" href="#alltogether" title="Permalink to this headline"></a></h2>
<p>Create the configuration ini-file according to your distribution (see below) and
restart the uwsgi application.</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<p># init.d &gt; /usr/share/doc/uwsgi/README.Debian.gz
# For uWSGI debian uses the LSB init process, this might be changed
# one day, see <a class="reference external" href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833067">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833067</a></p>
<p>create /etc/uwsgi/apps-available/searx.ini
enable: sudo -H ln -s /etc/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-enabled/
start: sudo -H service uwsgi start searx
restart: sudo -H service uwsgi restart searx
stop: sudo -H service uwsgi stop searx
disable: sudo -H rm /etc/uwsgi/apps-enabled/searx.ini
..</p>
</div>
<blockquote>
<div><p># systemd &gt; /usr/lib/systemd/system/uwsgi&#64;.service
# For uWSGI archlinux uses systemd template units, see
# - <a class="reference external" href="http://0pointer.de/blog/projects/instances.html">http://0pointer.de/blog/projects/instances.html</a>
# - <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd">https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd</a></p>
<p>create: /etc/uwsgi/searx.ini
enable: sudo -H systemctl enable <a class="reference external" href="mailto:uwsgi&#37;&#52;&#48;searx">uwsgi<span>&#64;</span>searx</a>
start: sudo -H systemctl start <a class="reference external" href="mailto:uwsgi&#37;&#52;&#48;searx">uwsgi<span>&#64;</span>searx</a>
restart: sudo -H systemctl restart <a class="reference external" href="mailto:uwsgi&#37;&#52;&#48;searx">uwsgi<span>&#64;</span>searx</a>
stop: sudo -H systemctl stop <a class="reference external" href="mailto:uwsgi&#37;&#52;&#48;searx">uwsgi<span>&#64;</span>searx</a>
disable: sudo -H systemctl disable <a class="reference external" href="mailto:uwsgi&#37;&#52;&#48;searx">uwsgi<span>&#64;</span>searx</a>
..</p>
</div></blockquote>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<p># systemd &gt; /usr/lib/systemd/system/uwsgi.service
# The unit file starts uWSGI in emperor mode (/etc/uwsgi.ini), see
# - <a class="reference external" href="https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html">https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html</a></p>
<p>create: /etc/uwsgi.d/searx.ini
restart: sudo -H touch /etc/uwsgi.d/searx.ini
disable: sudo -H rm /etc/uwsgi.d/searx.ini
..</p>
</div>
</div>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
<div class="item sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<div class="docutils container">
<p>Arch Linux</p>
</div>
</div>
<div class="item sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<div class="docutils container">
<p>Fedora / RHEL</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<pre class="code ini literal-block"><code><span class="keyword">[uwsgi]</span>
<span class="comment single"># uWSGI core</span>
<span class="comment single"># ----------</span>
<span class="comment single">#</span>
<span class="comment single"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#uwsgi-core</span>
<span class="comment single"># Who will run the code</span>
<span class="name attribute">uid</span> <span class="operator">=</span> <span class="literal string">searx</span>
<span class="name attribute">gid</span> <span class="operator">=</span> <span class="literal string">searx</span>
<span class="comment single"># chdir to specified directory before apps loading</span>
<span class="name attribute">chdir</span> <span class="operator">=</span> <span class="literal string">/usr/local/searx/searx-src/searx</span>
<span class="comment single"># searx configuration (settings.yml)</span>
<span class="name attribute">env</span> <span class="operator">=</span> <span class="literal string">SEARX_SETTINGS_PATH=/etc/searx/settings.yml</span>
<span class="comment single"># disable logging for privacy</span>
<span class="name attribute">disable-logging</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># The right granted on the created socket</span>
<span class="name attribute">chmod-socket</span> <span class="operator">=</span> <span class="literal string">666</span>
<span class="comment single"># Plugin to use and interpretor config</span>
<span class="name attribute">single-interpreter</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># enable master process</span>
<span class="name attribute">master</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># load apps in each worker instead of the master</span>
<span class="name attribute">lazy-apps</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># load uWSGI plugins</span>
<span class="name attribute">plugin</span> <span class="operator">=</span> <span class="literal string">python3,http</span>
<span class="comment single"># By default the Python plugin does not initialize the GIL. This means your</span>
<span class="comment single"># app-generated threads will not run. If you need threads, remember to enable</span>
<span class="comment single"># them with enable-threads. Running uWSGI in multithreading mode (with the</span>
<span class="comment single"># threads options) will automatically enable threading support. This *strange*</span>
<span class="comment single"># default behaviour is for performance reasons.</span>
<span class="name attribute">enable-threads</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># plugin: python</span>
<span class="comment single"># --------------</span>
<span class="comment single">#</span>
<span class="comment single"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python</span>
<span class="comment single"># load a WSGI module</span>
<span class="name attribute">module</span> <span class="operator">=</span> <span class="literal string">searx.webapp</span>
<span class="comment single"># set PYTHONHOME/virtualenv</span>
<span class="name attribute">virtualenv</span> <span class="operator">=</span> <span class="literal string">/usr/local/searx/searx-pyenv</span>
<span class="comment single"># add directory (or glob) to pythonpath</span>
<span class="name attribute">pythonpath</span> <span class="operator">=</span> <span class="literal string">/usr/local/searx/searx-src</span>
<span class="comment single"># speak to upstream</span>
<span class="comment single"># -----------------</span>
<span class="comment single">#</span>
<span class="comment single"># Activate the 'http' configuration for filtron or activate the 'socket'</span>
<span class="comment single"># configuration if you setup your HTTP server to use uWSGI protocol via sockets.</span>
<span class="comment single"># using IP:</span>
<span class="comment single">#</span>
<span class="comment single"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http</span>
<span class="comment single"># Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html</span>
<span class="name attribute">http</span> <span class="operator">=</span> <span class="literal string">127.0.0.1:8888</span>
<span class="comment single"># using unix-sockets:</span>
<span class="comment single">#</span>
<span class="comment single"># On some distributions you need to create the app folder for the sockets::</span>
<span class="comment single">#</span>
<span class="comment single"># mkdir -p /run/uwsgi/app/searx</span>
<span class="comment single"># chmod -R searx:searx /run/uwsgi/app/searx</span>
<span class="comment single">#</span>
<span class="comment single"># socket = /run/uwsgi/app/searx/socket</span>
<span class="error">..</span></code></pre>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-QXJjaCBMaW51eA== docutils container">
<pre class="code ini literal-block"><code><span class="keyword">[uwsgi]</span>
<span class="comment single"># uWSGI core</span>
<span class="comment single"># ----------</span>
<span class="comment single">#</span>
<span class="comment single"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#uwsgi-core</span>
<span class="comment single"># Who will run the code</span>
<span class="name attribute">uid</span> <span class="operator">=</span> <span class="literal string">searx</span>
<span class="name attribute">gid</span> <span class="operator">=</span> <span class="literal string">searx</span>
<span class="comment single"># chdir to specified directory before apps loading</span>
<span class="name attribute">chdir</span> <span class="operator">=</span> <span class="literal string">/usr/local/searx/searx-src/searx</span>
<span class="comment single"># searx configuration (settings.yml)</span>
<span class="name attribute">env</span> <span class="operator">=</span> <span class="literal string">SEARX_SETTINGS_PATH=/etc/searx/settings.yml</span>
<span class="comment single"># disable logging for privacy</span>
<span class="name attribute">logger</span> <span class="operator">=</span> <span class="literal string">systemd</span>
<span class="name attribute">disable-logging</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># The right granted on the created socket</span>
<span class="name attribute">chmod-socket</span> <span class="operator">=</span> <span class="literal string">666</span>
<span class="comment single"># Plugin to use and interpretor config</span>
<span class="name attribute">single-interpreter</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># enable master process</span>
<span class="name attribute">master</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># load apps in each worker instead of the master</span>
<span class="name attribute">lazy-apps</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># load uWSGI plugins</span>
<span class="name attribute">plugin</span> <span class="operator">=</span> <span class="literal string">python</span>
<span class="comment single"># By default the Python plugin does not initialize the GIL. This means your</span>
<span class="comment single"># app-generated threads will not run. If you need threads, remember to enable</span>
<span class="comment single"># them with enable-threads. Running uWSGI in multithreading mode (with the</span>
<span class="comment single"># threads options) will automatically enable threading support. This *strange*</span>
<span class="comment single"># default behaviour is for performance reasons.</span>
<span class="name attribute">enable-threads</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># plugin: python</span>
<span class="comment single"># --------------</span>
<span class="comment single">#</span>
<span class="comment single"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python</span>
<span class="comment single"># load a WSGI module</span>
<span class="name attribute">module</span> <span class="operator">=</span> <span class="literal string">searx.webapp</span>
<span class="comment single"># set PYTHONHOME/virtualenv</span>
<span class="name attribute">virtualenv</span> <span class="operator">=</span> <span class="literal string">/usr/local/searx/searx-pyenv</span>
<span class="comment single"># add directory (or glob) to pythonpath</span>
<span class="name attribute">pythonpath</span> <span class="operator">=</span> <span class="literal string">/usr/local/searx/searx-src</span>
<span class="comment single"># speak to upstream</span>
<span class="comment single"># -----------------</span>
<span class="comment single">#</span>
<span class="comment single"># Activate the 'http' configuration for filtron or activate the 'socket'</span>
<span class="comment single"># configuration if you setup your HTTP server to use uWSGI protocol via sockets.</span>
<span class="comment single"># using IP:</span>
<span class="comment single">#</span>
<span class="comment single"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http</span>
<span class="comment single"># Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html</span>
<span class="name attribute">http</span> <span class="operator">=</span> <span class="literal string">127.0.0.1:8888</span>
<span class="comment single"># using unix-sockets:</span>
<span class="comment single">#</span>
<span class="comment single"># On some distributions you need to create the app folder for the sockets::</span>
<span class="comment single">#</span>
<span class="comment single"># mkdir -p /run/uwsgi/app/searx</span>
<span class="comment single"># chown -R searx:searx /run/uwsgi/app/searx</span>
<span class="comment single">#</span>
<span class="comment single"># socket = /run/uwsgi/app/searx/socket</span>
<span class="error">..</span></code></pre>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-RmVkb3JhIC8gUkhFTA== docutils container">
<pre class="code ini literal-block"><code><span class="keyword">[uwsgi]</span>
<span class="comment single"># uWSGI core</span>
<span class="comment single"># ----------</span>
<span class="comment single">#</span>
<span class="comment single"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#uwsgi-core</span>
<span class="comment single"># Who will run the code</span>
<span class="name attribute">uid</span> <span class="operator">=</span> <span class="literal string">searx</span>
<span class="name attribute">gid</span> <span class="operator">=</span> <span class="literal string">searx</span>
<span class="comment single"># chdir to specified directory before apps loading</span>
<span class="name attribute">chdir</span> <span class="operator">=</span> <span class="literal string">/usr/local/searx/searx-src/searx</span>
<span class="comment single"># searx configuration (settings.yml)</span>
<span class="name attribute">env</span> <span class="operator">=</span> <span class="literal string">SEARX_SETTINGS_PATH=/etc/searx/settings.yml</span>
<span class="comment single"># disable logging for privacy</span>
<span class="name attribute">disable-logging</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># The right granted on the created socket</span>
<span class="name attribute">chmod-socket</span> <span class="operator">=</span> <span class="literal string">666</span>
<span class="comment single"># Plugin to use and interpretor config</span>
<span class="name attribute">single-interpreter</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># enable master process</span>
<span class="name attribute">master</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># load apps in each worker instead of the master</span>
<span class="name attribute">lazy-apps</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># load uWSGI plugins</span>
<span class="name attribute">plugin</span> <span class="operator">=</span> <span class="literal string">python3,http</span>
<span class="comment single"># By default the Python plugin does not initialize the GIL. This means your</span>
<span class="comment single"># app-generated threads will not run. If you need threads, remember to enable</span>
<span class="comment single"># them with enable-threads. Running uWSGI in multithreading mode (with the</span>
<span class="comment single"># threads options) will automatically enable threading support. This *strange*</span>
<span class="comment single"># default behaviour is for performance reasons.</span>
<span class="name attribute">enable-threads</span> <span class="operator">=</span> <span class="literal string">true</span>
<span class="comment single"># plugin: python</span>
<span class="comment single"># --------------</span>
<span class="comment single">#</span>
<span class="comment single"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python</span>
<span class="comment single"># load a WSGI module</span>
<span class="name attribute">module</span> <span class="operator">=</span> <span class="literal string">searx.webapp</span>
<span class="comment single"># set PYTHONHOME/virtualenv</span>
<span class="name attribute">virtualenv</span> <span class="operator">=</span> <span class="literal string">/usr/local/searx/searx-pyenv</span>
<span class="comment single"># add directory (or glob) to pythonpath</span>
<span class="name attribute">pythonpath</span> <span class="operator">=</span> <span class="literal string">/usr/local/searx/searx-src</span>
<span class="comment single"># speak to upstream</span>
<span class="comment single"># -----------------</span>
<span class="comment single">#</span>
<span class="comment single"># Activate the 'http' configuration for filtron or activate the 'socket'</span>
<span class="comment single"># configuration if you setup your HTTP server to use uWSGI protocol via sockets.</span>
<span class="comment single"># using IP:</span>
<span class="comment single">#</span>
<span class="comment single"># https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http</span>
<span class="comment single"># Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html</span>
<span class="name attribute">http</span> <span class="operator">=</span> <span class="literal string">127.0.0.1:8888</span>
<span class="comment single"># using unix-sockets:</span>
<span class="comment single">#</span>
<span class="comment single"># On some distributions you need to create the app folder for the sockets::</span>
<span class="comment single">#</span>
<span class="comment single"># mkdir -p /run/uwsgi/app/searx</span>
<span class="comment single"># chmod -R searx:searx /run/uwsgi/app/searx</span>
<span class="comment single">#</span>
<span class="comment single"># socket = /run/uwsgi/app/searx/socket</span>
<span class="error">..</span></code></pre>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://searx.space/">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="installation-searx.html" title="previous chapter">Step by step installation</a>
<li>Next: <a href="installation-nginx.html" title="next chapter">Install with nginx</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Installation &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -15,7 +16,7 @@
<script src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="settings.yml" href="settings.html" />
<link rel="next" title="Step by step installation" href="installation-searx.html" />
<link rel="prev" title="Administrator documentation" href="index.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
@ -27,13 +28,14 @@
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="settings.html" title="settings.yml"
<a href="installation-searx.html" title="Step by step installation"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Administrator documentation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Installation</a></li>
</ul>
</div>
@ -43,306 +45,57 @@
<div class="body" role="main">
<div class="section" id="installation">
<span id="id1"></span><h1><a class="toc-backref" href="#id3">Installation</a><a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<span id="id1"></span><h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h1>
<p><em>Youre spoilt for choice</em>, choose your preferred method of installation.</p>
<ul class="simple">
<li><p><a class="reference internal" href="#installation" id="id3">Installation</a></p>
<ul>
<li><p><a class="reference internal" href="#basic-installation" id="id4">Basic installation</a></p></li>
<li><p><a class="reference internal" href="#configuration" id="id5">Configuration</a></p></li>
<li><p><a class="reference internal" href="#check" id="id6">Check</a></p></li>
<li><p><a class="reference internal" href="#uwsgi" id="id7">uwsgi</a></p></li>
<li><p><a class="reference internal" href="#web-server" id="id8">Web server</a></p>
<ul>
<li><p><a class="reference internal" href="#with-nginx" id="id9">with nginx</a></p></li>
<li><p><a class="reference internal" href="#with-apache" id="id10">with apache</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#how-to-update" id="id11">How to update</a></p></li>
<li><p><a class="reference internal" href="#docker" id="id12">Docker</a></p></li>
<li><p><a class="reference internal" href="#references" id="id13">References</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="installation-docker.html#installation-docker"><span class="std std-ref">Docker installation</span></a></p></li>
<li><p><a class="reference internal" href="#installation-scripts"><span class="std std-ref">Installation scripts</span></a></p></li>
<li><p><a class="reference internal" href="installation-searx.html#installation-basic"><span class="std std-ref">Step by step installation</span></a></p></li>
</ul>
<p>The <a class="reference internal" href="installation-searx.html#installation-basic"><span class="std std-ref">Step by step installation</span></a> is good enough for intranet usage and it is a
excellent illustration of <em>how a searx instance is build up</em>. If you place your
instance public to the internet you should really consider to install a
<a class="reference internal" href="../utils/filtron.sh.html#filtron-sh"><span class="std std-ref">filtron reverse proxy</span></a> and for privacy a <a class="reference internal" href="../utils/morty.sh.html#morty-sh"><span class="std std-ref">result proxy</span></a> is mandatory.</p>
<p>Therefore, if you do not have any special preferences, its recommend to use the
<a class="reference internal" href="installation-docker.html#installation-docker"><span class="std std-ref">Docker installation</span></a> or the <a class="reference internal" href="#installation-scripts">Installation scripts</a> from our <a class="reference internal" href="../utils/index.html#toolboxing"><span class="std std-ref">tooling
box</span></a> as described below.</p>
<div class="section" id="installation-scripts">
<span id="id2"></span><h2>Installation scripts<a class="headerlink" href="#installation-scripts" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">Update OS first!</p>
<p>To avoid unwanted side effects, update your OS before installing searx.</p>
</div>
<div class="section" id="basic-installation">
<h2><a class="toc-backref" href="#id4">Basic installation</a><a class="headerlink" href="#basic-installation" title="Permalink to this headline"></a></h2>
<p>Step by step installation for Debian/Ubuntu with virtualenv. For Ubuntu, be sure
to have enable universe repository.</p>
<p>Install packages:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H apt-get install <span class="se">\</span>
git build-essential libxslt-dev <span class="se">\</span>
python-dev python-virtualenv python-babel <span class="se">\</span>
zlib1g-dev libffi-dev libssl-dev
<p>The following will install a setup as shown in <a class="reference internal" href="architecture.html#architecture"><span class="std std-ref">Architecture</span></a>. First you
need to get a clone. The clone is only needed for the installation procedure
and some maintenance tasks (alternatively you can create your own fork).</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span> ~/Downloads
$ git clone https://github.com/asciimoo/searx searx
$ <span class="nb">cd</span> searx
</pre></div>
</div>
<p>Install searx:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> /usr/local
sudo -H git clone https://github.com/asciimoo/searx.git
sudo -H useradd searx -d /usr/local/searx
sudo -H chown searx:searx -R /usr/local/searx
<p><strong>Install</strong> <a class="reference internal" href="../utils/searx.sh.html#searx-sh"><span class="std std-ref">searx service</span></a></p>
<p>This installs searx as described in <a class="reference internal" href="installation-searx.html#installation-basic"><span class="std std-ref">Step by step installation</span></a>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/searx.sh install all
</pre></div>
</div>
<p>Install dependencies in a virtualenv:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> /usr/local/searx
sudo -H -u searx -i
<p><strong>Install</strong> <a class="reference internal" href="../utils/filtron.sh.html#filtron-sh"><span class="std std-ref">filtron reverse proxy</span></a></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/filtron.sh install all
</pre></div>
</div>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="o">(</span>searx<span class="o">)</span>$ virtualenv searx-ve
<span class="o">(</span>searx<span class="o">)</span>$ . ./searx-ve/bin/activate
<span class="o">(</span>searx<span class="o">)</span>$ ./manage.sh update_packages
<p><strong>Install</strong> <a class="reference internal" href="../utils/morty.sh.html#morty-sh"><span class="std std-ref">result proxy</span></a></p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/morty.sh install all
</pre></div>
</div>
</div>
<div class="section" id="configuration">
<h2><a class="toc-backref" href="#id5">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h2>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sed -i -e <span class="s2">&quot;s/ultrasecretkey/`openssl rand -hex 16`/g&quot;</span> searx/settings.yml
</pre></div>
</div>
<p>Edit searx/settings.yml if necessary.</p>
</div>
<div class="section" id="check">
<h2><a class="toc-backref" href="#id6">Check</a><a class="headerlink" href="#check" title="Permalink to this headline"></a></h2>
<p>Start searx:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>python searx/webapp.py
</pre></div>
</div>
<p>Go to <a class="reference external" href="http://localhost:8888">http://localhost:8888</a></p>
<p>If everything works fine, disable the debug option in settings.yml:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sed -i -e <span class="s2">&quot;s/debug : True/debug : False/g&quot;</span> searx/settings.yml
</pre></div>
</div>
<p>At this point searx is not demonized ; uwsgi allows this.</p>
<p>You can exit the virtualenv and the searx user bash (enter exit command
twice).</p>
</div>
<div class="section" id="uwsgi">
<h2><a class="toc-backref" href="#id7">uwsgi</a><a class="headerlink" href="#uwsgi" title="Permalink to this headline"></a></h2>
<p>Install packages:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H apt-get install <span class="se">\</span>
uwsgi uwsgi-plugin-python
</pre></div>
</div>
<p>Create the configuration file <code class="docutils literal notranslate"><span class="pre">/etc/uwsgi/apps-available/searx.ini</span></code> with this
content:</p>
<div class="highlight-ini notranslate"><div class="highlight"><pre><span></span><span class="k">[uwsgi]</span>
<span class="c1"># Who will run the code</span>
<span class="na">uid</span> <span class="o">=</span> <span class="s">searx</span>
<span class="na">gid</span> <span class="o">=</span> <span class="s">searx</span>
<span class="c1"># disable logging for privacy</span>
<span class="na">disable-logging</span> <span class="o">=</span> <span class="s">true</span>
<span class="c1"># Number of workers (usually CPU count)</span>
<span class="na">workers</span> <span class="o">=</span> <span class="s">4</span>
<span class="c1"># The right granted on the created socket</span>
<span class="na">chmod-socket</span> <span class="o">=</span> <span class="s">666</span>
<span class="c1"># Plugin to use and interpretor config</span>
<span class="na">single-interpreter</span> <span class="o">=</span> <span class="s">true</span>
<span class="na">master</span> <span class="o">=</span> <span class="s">true</span>
<span class="na">plugin</span> <span class="o">=</span> <span class="s">python</span>
<span class="na">lazy-apps</span> <span class="o">=</span> <span class="s">true</span>
<span class="na">enable-threads</span> <span class="o">=</span> <span class="s">true</span>
<span class="c1"># Module to import</span>
<span class="na">module</span> <span class="o">=</span> <span class="s">searx.webapp</span>
<span class="c1"># Support running the module from a webserver subdirectory.</span>
<span class="na">route-run</span> <span class="o">=</span> <span class="s">fixpathinfo:</span>
<span class="c1"># Virtualenv and python path</span>
<span class="na">virtualenv</span> <span class="o">=</span> <span class="s">/usr/local/searx/searx-ve/</span>
<span class="na">pythonpath</span> <span class="o">=</span> <span class="s">/usr/local/searx/</span>
<span class="na">chdir</span> <span class="o">=</span> <span class="s">/usr/local/searx/searx/</span>
</pre></div>
</div>
<p>Activate the uwsgi application and restart:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> /etc/uwsgi/apps-enabled
ln -s ../apps-available/searx.ini
/etc/init.d/uwsgi restart
</pre></div>
</div>
</div>
<div class="section" id="web-server">
<h2><a class="toc-backref" href="#id8">Web server</a><a class="headerlink" href="#web-server" title="Permalink to this headline"></a></h2>
<div class="section" id="with-nginx">
<h3><a class="toc-backref" href="#id9">with nginx</a><a class="headerlink" href="#with-nginx" title="Permalink to this headline"></a></h3>
<p>If nginx is not installed (uwsgi will not work with the package
nginx-light):</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H apt-get install nginx
</pre></div>
</div>
<div class="section" id="hosted-at">
<h4>Hosted at /<a class="headerlink" href="#hosted-at" title="Permalink to this headline"></a></h4>
<p>Create the configuration file <code class="docutils literal notranslate"><span class="pre">/etc/nginx/sites-available/searx</span></code> with this
content:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">server</span> <span class="p">{</span>
<span class="kn">listen</span> <span class="mi">80</span><span class="p">;</span>
<span class="kn">server_name</span> <span class="s">searx.example.com</span><span class="p">;</span>
<span class="kn">root</span> <span class="s">/usr/local/searx/searx</span><span class="p">;</span>
<span class="kn">location</span> <span class="s">/static</span> <span class="p">{</span>
<span class="p">}</span>
<span class="kn">location</span> <span class="s">/</span> <span class="p">{</span>
<span class="kn">include</span> <span class="s">uwsgi_params</span><span class="p">;</span>
<span class="kn">uwsgi_pass</span> <span class="s">unix:/run/uwsgi/app/searx/socket</span><span class="p">;</span>
<span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Create a symlink to sites-enabled:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H ln -s /etc/nginx/sites-available/searx /etc/nginx/sites-enabled/searx
</pre></div>
</div>
<p>Restart service:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H service nginx restart
sudo -H service uwsgi restart
</pre></div>
</div>
</div>
<div class="section" id="from-subdirectory-url-searx">
<h4>from subdirectory URL (/searx)<a class="headerlink" href="#from-subdirectory-url-searx" title="Permalink to this headline"></a></h4>
<p>Add this configuration in the server config file
<code class="docutils literal notranslate"><span class="pre">/etc/nginx/sites-enabled/default</span></code>:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">location</span> <span class="s">/searx/static</span> <span class="p">{</span>
<span class="kn">alias</span> <span class="s">/usr/local/searx/searx/static</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">location</span> <span class="s">/searx</span> <span class="p">{</span>
<span class="kn">uwsgi_param</span> <span class="s">SCRIPT_NAME</span> <span class="s">/searx</span><span class="p">;</span>
<span class="kn">include</span> <span class="s">uwsgi_params</span><span class="p">;</span>
<span class="kn">uwsgi_pass</span> <span class="s">unix:/run/uwsgi/app/searx/socket</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p><strong>OR</strong> using reverse proxy (Please, note that reverse proxy advised to be used
in case of single-user or low-traffic instances.)</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">location</span> <span class="s">/searx/static</span> <span class="p">{</span>
<span class="kn">alias</span> <span class="s">/usr/local/searx/searx/static</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">location</span> <span class="s">/searx</span> <span class="p">{</span>
<span class="kn">proxy_pass</span> <span class="s">http://127.0.0.1:8888</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">Host</span> <span class="nv">$host</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Forwarded-For</span> <span class="nv">$proxy_add_x_forwarded_for</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Scheme</span> <span class="nv">$scheme</span><span class="p">;</span>
<span class="kn">proxy_set_header</span> <span class="s">X-Script-Name</span> <span class="s">/searx</span><span class="p">;</span>
<span class="kn">proxy_buffering</span> <span class="no">off</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Enable <code class="docutils literal notranslate"><span class="pre">base_url</span></code> in <code class="docutils literal notranslate"><span class="pre">searx/settings.yml</span></code></p>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">base_url</span> <span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">http://your.domain.tld/searx/</span>
</pre></div>
</div>
<p>Restart service:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H service nginx restart
sudo -H service uwsgi restart
</pre></div>
</div>
<div class="section" id="disable-logs">
<h5>disable logs<a class="headerlink" href="#disable-logs" title="Permalink to this headline"></a></h5>
<p>for better privacy you can disable nginx logs about searx.</p>
<p>how to proceed: below <code class="docutils literal notranslate"><span class="pre">uwsgi_pass</span></code> in <code class="docutils literal notranslate"><span class="pre">/etc/nginx/sites-available/default</span></code>
add:</p>
<div class="highlight-nginx notranslate"><div class="highlight"><pre><span></span><span class="k">access_log</span> <span class="s">/dev/null</span><span class="p">;</span>
<span class="k">error_log</span> <span class="s">/dev/null</span><span class="p">;</span>
</pre></div>
</div>
<p>Restart service:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H service nginx restart
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="with-apache">
<h3><a class="toc-backref" href="#id10">with apache</a><a class="headerlink" href="#with-apache" title="Permalink to this headline"></a></h3>
<p>Add wsgi mod:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H apt-get install libapache2-mod-uwsgi
sudo -H a2enmod uwsgi
</pre></div>
</div>
<p>Add this configuration in the file <code class="docutils literal notranslate"><span class="pre">/etc/apache2/apache2.conf</span></code>:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nt">&lt;Location</span> <span class="s">/</span><span class="nt">&gt;</span>
<span class="nb">Options</span> FollowSymLinks Indexes
<span class="nb">SetHandler</span> uwsgi-handler
<span class="nb">uWSGISocket</span> <span class="sx">/run/uwsgi/app/searx/socket</span>
<span class="nt">&lt;/Location&gt;</span>
</pre></div>
</div>
<p>Note that if your instance of searx is not at the root, you should change
<code class="docutils literal notranslate"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> by the location of your instance, like <code class="docutils literal notranslate"><span class="pre">&lt;Location</span> <span class="pre">/searx&gt;</span></code>.</p>
<p>Restart Apache:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H /etc/init.d/apache2 restart
</pre></div>
</div>
<div class="section" id="id2">
<h4>disable logs<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h4>
<p>For better privacy you can disable Apache logs.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>You can only disable logs for the whole (virtual) server not for a specific
path.</p>
</div>
<p>Go back to <code class="docutils literal notranslate"><span class="pre">/etc/apache2/apache2.conf</span></code> and above <code class="docutils literal notranslate"><span class="pre">&lt;Location</span> <span class="pre">/&gt;</span></code> add:</p>
<div class="highlight-apache notranslate"><div class="highlight"><pre><span></span><span class="nb">CustomLog</span> <span class="sx">/dev/null</span> combined
</pre></div>
</div>
<p>Restart Apache:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H /etc/init.d/apache2 restart
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="how-to-update">
<h2><a class="toc-backref" href="#id11">How to update</a><a class="headerlink" href="#how-to-update" title="Permalink to this headline"></a></h2>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> /usr/local/searx
sudo -H -u searx -i
</pre></div>
</div>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="o">(</span>searx<span class="o">)</span>$ . ./searx-ve/bin/activate
<span class="o">(</span>searx<span class="o">)</span>$ git stash
<span class="o">(</span>searx<span class="o">)</span>$ git pull origin master
<span class="o">(</span>searx<span class="o">)</span>$ git stash apply
<span class="o">(</span>searx<span class="o">)</span>$ ./manage.sh update_packages
</pre></div>
</div>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H service uwsgi restart
</pre></div>
</div>
</div>
<div class="section" id="docker">
<h2><a class="toc-backref" href="#id12">Docker</a><a class="headerlink" href="#docker" title="Permalink to this headline"></a></h2>
<p>Make sure you have installed Docker. For instance, you can deploy searx like this:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker pull wonderfall/searx
docker run -d --name searx -p <span class="nv">$PORT</span>:8888 wonderfall/searx
</pre></div>
</div>
<p>Go to <code class="docutils literal notranslate"><span class="pre">http://localhost:$PORT</span></code>.</p>
<p>See <a class="reference external" href="https://hub.docker.com/r/wonderfall/searx/">https://hub.docker.com/r/wonderfall/searx/</a> for more informations. Its also
possible to build searx from the embedded Dockerfile.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/asciimoo/searx.git
<span class="nb">cd</span> searx
docker build -t whatever/searx .
</pre></div>
</div>
</div>
<div class="section" id="references">
<h2><a class="toc-backref" href="#id13">References</a><a class="headerlink" href="#references" title="Permalink to this headline"></a></h2>
<p>If all services are running fine, you can add it to your HTTP server:</p>
<ul class="simple">
<li><p><a class="reference external" href="https://about.okhin.fr/posts/Searx/">https://about.okhin.fr/posts/Searx/</a> with some additions</p></li>
<li><p>How to: <a class="reference external" href="https://www.reddit.com/r/privacytoolsIO/comments/366kvn/how_to_setup_your_own_privacy_respecting_search/">Setup searx in a couple of hours with a free SSL certificate</a></p></li>
<li><p><a class="reference internal" href="installation-apache.html#installation-apache"><span class="std std-ref">Install with apache</span></a></p></li>
<li><p><a class="reference internal" href="installation-nginx.html#installation-nginx"><span class="std std-ref">Install with nginx</span></a></p></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -372,7 +125,7 @@ docker build -t whatever/searx .
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="index.html" title="previous chapter">Administrator documentation</a>
<li>Next: <a href="settings.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></ul>
<li>Next: <a href="installation-searx.html" title="next chapter">Step by step installation</a></ul>
</li>
</ul>
</li>
@ -394,7 +147,7 @@ docker build -t whatever/searx .
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to setup result proxy &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="filtron.html" title="How to protect an instance"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">How to setup result proxy</a></li>
</ul>
</div>
@ -43,7 +45,13 @@
<div class="body" role="main">
<div class="section" id="how-to-setup-result-proxy">
<h1>How to setup result proxy<a class="headerlink" href="#how-to-setup-result-proxy" title="Permalink to this headline"></a></h1>
<span id="searx-morty"></span><h1>How to setup result proxy<a class="headerlink" href="#how-to-setup-result-proxy" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">further reading</p>
<ul class="simple">
<li><p><a class="reference internal" href="../utils/morty.sh.html#morty-sh"><span class="std std-ref">utils/morty.sh</span></a></p></li>
</ul>
</div>
<p>By default searx can only act as an image proxy for result images, but it is
possible to proxify all the result URLs with an external service, <a class="reference external" href="https://github.com/asciimoo/morty">morty</a>.</p>
<p>To use this feature, morty has to be installed and activated in searxs
@ -63,6 +71,7 @@ possible to proxify all the result URLs with an external service, <a class="refe
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -114,7 +123,7 @@ possible to proxify all the result URLs with an external service, <a class="refe
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Plugins builtin &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="engines.html" title="Engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Plugins builtin</a></li>
</ul>
</div>
@ -122,15 +124,12 @@
</div>
</td>
</tr>
<tr class="row-even"><th class="stub"><p>Test</p></th>
<td></td>
<td><p>Test plugin</p></td>
</tr>
</tbody>
</table>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -182,7 +181,7 @@
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>settings.yml &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -16,7 +17,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Administration API" href="api.html" />
<link rel="prev" title="Installation" href="installation.html" />
<link rel="prev" title="How to update" href="update-searx.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
@ -30,10 +31,11 @@
<a href="api.html" title="Administration API"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation.html" title="Installation"
<a href="update-searx.html" title="How to update"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
</ul>
</div>
@ -44,15 +46,23 @@
<div class="section" id="settings-yml">
<span id="id1"></span><h1><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code><a class="headerlink" href="#settings-yml" title="Permalink to this headline"></a></h1>
<p>This page describe the options possibilities of the <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a>
file.</p>
<div class="sidebar">
<p class="sidebar-title">Further reading ..</p>
<ul class="simple">
<li><p><a class="reference internal" href="../dev/search_api.html#search-api"><span class="std std-ref">Search API</span></a></p></li>
</ul>
</div>
<p>This page describe the options possibilities of the settings.yml file.</p>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#global-settings" id="id2">Global Settings</a></p></li>
<li><p><a class="reference internal" href="#engine-settings" id="id3">Engine settings</a></p></li>
</ul>
</div>
<div class="section" id="global-settings">
<span id="settings-global"></span><h2>Global Settings<a class="headerlink" href="#global-settings" title="Permalink to this headline"></a></h2>
<span id="settings-global"></span><h2><a class="toc-backref" href="#id2">Global Settings</a><a class="headerlink" href="#global-settings" title="Permalink to this headline"></a></h2>
<div class="highlight-yaml notranslate"><div class="highlight"><pre><span></span><span class="l l-Scalar l-Scalar-Plain">server</span><span class="p p-Indicator">:</span>
<span class="l l-Scalar l-Scalar-Plain">port</span> <span class="p p-Indicator">:</span> <span class="l l-Scalar l-Scalar-Plain">8888</span>
<span class="l l-Scalar l-Scalar-Plain">secret_key</span> <span class="p p-Indicator">:</span> <span class="s">&quot;ultrasecretkey&quot;</span> <span class="c1"># change this!</span>
@ -127,7 +137,7 @@ code, like <code class="docutils literal notranslate"><span class="pre">fr</span
</dd>
</dl>
<dl class="simple">
<dt><code class="docutils literal notranslate"><span class="pre">outgoing_proxies</span></code> :</dt><dd><p>Define a proxy you wish to use, see <a class="reference external" href="http://docs.python-requests.org/en/latest/user/advanced/#proxies">requests proxies</a>. SOCKS proxies are
<dt><code class="docutils literal notranslate"><span class="pre">outgoing_proxies</span></code> :</dt><dd><p>Define a proxy you wish to use, see <a class="reference external" href="http://requests.readthedocs.io/en/latest/user/advanced/#proxies">requests proxies</a>. SOCKS proxies are
not supported / see <cite>PR SOCKS support</cite>.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">source_ips</span></code> :</dt><dd><p>If you use multiple nework interfaces, define from which IP the requests must
@ -138,7 +148,7 @@ be made.</p>
</dl>
</div>
<div class="section" id="engine-settings">
<span id="settings-engine"></span><h2>Engine settings<a class="headerlink" href="#engine-settings" title="Permalink to this headline"></a></h2>
<span id="settings-engine"></span><h2><a class="toc-backref" href="#id3">Engine settings</a><a class="headerlink" href="#engine-settings" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">Further reading ..</p>
<ul class="simple">
@ -188,6 +198,8 @@ by using the full ISO code of language and country, like <code class="docutils l
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">weigth</span></code><span class="classifier">default <code class="docutils literal notranslate"><span class="pre">1</span></code></span></dt><dd><p>Weighting of the results of this engine.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">display_error_messages</span></code><span class="classifier">default <code class="docutils literal notranslate"><span class="pre">True</span></code></span></dt><dd><p>When an engine returns an error, the message is displayed on the user interface.</p>
</dd>
</dl>
<div class="admonition note">
<p class="admonition-title">Note</p>
@ -198,6 +210,7 @@ engines, and so wont be described here.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -226,7 +239,7 @@ engines, and so wont be described here.</p>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="installation.html" title="previous chapter">Installation</a>
<li>Previous: <a href="update-searx.html" title="previous chapter">How to update</a>
<li>Next: <a href="api.html" title="next chapter">Administration API</a></ul>
</li>
</ul>
@ -249,7 +262,7 @@ engines, and so wont be described here.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

137
admin/update-searx.html Normal file
View File

@ -0,0 +1,137 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to update &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script src="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
<script src="../_static/sphinx_tabs/tabs.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="settings.yml" href="settings.html" />
<link rel="prev" title="Docker installation" href="installation-docker.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="settings.html" title="settings.yml"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="installation-docker.html" title="Docker installation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">How to update</a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="how-to-update">
<span id="update-searx"></span><h1>How to update<a class="headerlink" href="#how-to-update" title="Permalink to this headline"></a></h1>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H -u searx -i
<span class="o">(</span>searx<span class="o">)</span>$ git stash
<span class="o">(</span>searx<span class="o">)</span>$ git pull origin master
<span class="o">(</span>searx<span class="o">)</span>$ git stash apply
<span class="o">(</span>searx<span class="o">)</span>$ ./manage.sh update_packages
</pre></div>
</div>
<p>Restart uwsgi:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu docutils container">
<div class="docutils container">
<p>Ubuntu / debian</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-VWJ1bnR1IC8gZGViaWFu active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H systemctl restart uwsgi
</pre></div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://searx.space/">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Administrator documentation</a>
<ul>
<li>Previous: <a href="installation-docker.html" title="previous chapter">Docker installation</a>
<li>Next: <a href="settings.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Searx admin interface &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="python3.html" title="Introducing Python 3 support"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Searx admin interface</a></li>
</ul>
</div>
@ -80,6 +82,7 @@ existing instances.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -131,7 +134,7 @@ existing instances.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Blog &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -16,7 +17,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Introducing Python 3 support" href="python3.html" />
<link rel="prev" title="reST primer" href="../dev/reST.html" />
<link rel="prev" title="utils/lxc.sh" href="../utils/lxc.sh.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
@ -30,9 +31,10 @@
<a href="python3.html" title="Introducing Python 3 support"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../dev/reST.html" title="reST primer"
<a href="../utils/lxc.sh.html" title="utils/lxc.sh"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Blog</a></li>
</ul>
</div>
@ -44,16 +46,38 @@
<div class="section" id="blog">
<h1>Blog<a class="headerlink" href="#blog" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">Contents</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="python3.html">Introducing Python 3 support</a></li>
<li class="toctree-l1"><a class="reference internal" href="admin.html">Searx admin interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="intro-offline.html">Preparation for offline engines</a></li>
<li class="toctree-l1"><a class="reference internal" href="private-engines.html">Limit access to your searx engines</a></li>
<li class="toctree-l1"><a class="reference internal" href="python3.html">Introducing Python 3 support</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python3.html#how-to-run-searx-using-python-3">How to run searx using Python 3</a></li>
<li class="toctree-l2"><a class="reference internal" href="python3.html#fun-facts">Fun facts</a></li>
<li class="toctree-l2"><a class="reference internal" href="python3.html#if-you-found-bugs">If you found bugs</a></li>
<li class="toctree-l2"><a class="reference internal" href="python3.html#acknowledgment">Acknowledgment</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="admin.html">Searx admin interface</a><ul>
<li class="toctree-l2"><a class="reference internal" href="admin.html#acknowledgements">Acknowledgements</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="intro-offline.html">Preparation for offline engines</a><ul>
<li class="toctree-l2"><a class="reference internal" href="intro-offline.html#offline-engines">Offline engines</a></li>
<li class="toctree-l2"><a class="reference internal" href="intro-offline.html#development-progress">Development progress</a></li>
<li class="toctree-l2"><a class="reference internal" href="intro-offline.html#next-steps">Next steps</a></li>
<li class="toctree-l2"><a class="reference internal" href="intro-offline.html#acknowledgement">Acknowledgement</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="private-engines.html">Limit access to your searx engines</a><ul>
<li class="toctree-l2"><a class="reference internal" href="private-engines.html#private-engines">Private engines</a></li>
<li class="toctree-l2"><a class="reference internal" href="private-engines.html#next-steps">Next steps</a></li>
<li class="toctree-l2"><a class="reference internal" href="private-engines.html#acknowledgement">Acknowledgement</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -80,7 +104,7 @@
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li>Previous: <a href="../dev/reST.html" title="previous chapter">reST primer</a>
<li>Previous: <a href="../utils/lxc.sh.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span></code></a>
<li>Next: <a href="python3.html" title="next chapter">Introducing Python 3 support</a>
</ul>
</li>
@ -102,7 +126,7 @@
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Preparation for offline engines &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="admin.html" title="Searx admin interface"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Preparation for offline engines</a></li>
</ul>
</div>
@ -107,6 +109,7 @@ as a table. You can check out the pull request for more details see
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -158,7 +161,7 @@ as a table. You can check out the pull request for more details see
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Limit access to your searx engines &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -29,7 +30,8 @@
<a href="intro-offline.html" title="Preparation for offline engines"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Limit access to your searx engines</a></li>
</ul>
</div>
@ -90,6 +92,7 @@ and come up with new solutions which fit your use case.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -141,7 +144,7 @@ and come up with new solutions which fit your use case.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Introducing Python 3 support &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="index.html" title="Blog"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Blog</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Introducing Python 3 support</a></li>
</ul>
</div>
@ -93,6 +95,7 @@ version in your issue, so we can investigate it properly.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -144,7 +147,7 @@ version in your issue, so we can investigate it properly.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to contribute &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="quickstart.html" title="Development Quickstart"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">How to contribute</a></li>
</ul>
</div>
@ -44,8 +46,26 @@
<div class="section" id="how-to-contribute">
<span id="id1"></span><h1>How to contribute<a class="headerlink" href="#how-to-contribute" title="Permalink to this headline"></a></h1>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#prime-directives-privacy-hackability" id="id3">Prime directives: Privacy, Hackability</a></p>
<ul>
<li><p><a class="reference internal" href="#privacy-by-design" id="id4">Privacy-by-design</a></p></li>
</ul>
</li>
<li><p><a class="reference internal" href="#code" id="id5">Code</a></p></li>
<li><p><a class="reference internal" href="#translation" id="id6">Translation</a></p></li>
<li><p><a class="reference internal" href="#documentation" id="id7">Documentation</a></p>
<ul>
<li><p><a class="reference internal" href="#live-build" id="id8">live build</a></p></li>
<li><p><a class="reference internal" href="#deploy-on-github-io" id="id9">deploy on github.io</a></p></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="prime-directives-privacy-hackability">
<h2>Prime directives: Privacy, Hackability<a class="headerlink" href="#prime-directives-privacy-hackability" title="Permalink to this headline"></a></h2>
<h2><a class="toc-backref" href="#id3">Prime directives: Privacy, Hackability</a><a class="headerlink" href="#prime-directives-privacy-hackability" title="Permalink to this headline"></a></h2>
<p>Searx has two prime directives, <strong>privacy-by-design and hackability</strong> . The
hackability comes in three levels:</p>
<ul class="simple">
@ -57,7 +77,7 @@ hackability comes in three levels:</p>
intention of wide mass-adoption, rounded corners, etc. The prime directive
“privacy” deserves a separate chapter, as its quite uncommon unfortunately.</p>
<div class="section" id="privacy-by-design">
<h3>Privacy-by-design<a class="headerlink" href="#privacy-by-design" title="Permalink to this headline"></a></h3>
<h3><a class="toc-backref" href="#id4">Privacy-by-design</a><a class="headerlink" href="#privacy-by-design" title="Permalink to this headline"></a></h3>
<p>Searx was born out of the need for a <strong>privacy-respecting</strong> search tool which
can be extended easily to maximize both, its search and its privacy protecting
capabilities.</p>
@ -82,7 +102,7 @@ privacy concerns do not fancy you, simply fork it.</p>
</div>
</div>
<div class="section" id="code">
<h2>Code<a class="headerlink" href="#code" title="Permalink to this headline"></a></h2>
<h2><a class="toc-backref" href="#id5">Code</a><a class="headerlink" href="#code" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">Create good commits!</p>
<ul class="simple">
@ -121,7 +141,7 @@ code.</p></li>
<p>For more help on getting started with searx development, see <a class="reference internal" href="quickstart.html#devquickstart"><span class="std std-ref">Development Quickstart</span></a>.</p>
</div>
<div class="section" id="translation">
<h2>Translation<a class="headerlink" href="#translation" title="Permalink to this headline"></a></h2>
<h2><a class="toc-backref" href="#id6">Translation</a><a class="headerlink" href="#translation" title="Permalink to this headline"></a></h2>
<p>Translation currently takes place on <a class="reference internal" href="translation.html#translation"><span class="std std-ref">transifex</span></a>.</p>
<div class="admonition caution">
<p class="admonition-title">Caution</p>
@ -129,7 +149,7 @@ code.</p></li>
</div>
</div>
<div class="section" id="documentation">
<span id="contrib-docs"></span><h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this headline"></a></h2>
<span id="contrib-docs"></span><h2><a class="toc-backref" href="#id7">Documentation</a><a class="headerlink" href="#documentation" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">The reST sources</p>
<p>has been moved from <code class="docutils literal notranslate"><span class="pre">gh-branch</span></code> into <code class="docutils literal notranslate"><span class="pre">master</span></code> (<a class="reference external" href="https://github.com/asciimoo/searx/blob/master/docs">git://docs</a>).</p>
@ -144,7 +164,7 @@ The HTML pages are in dist/docs.
</pre></div>
</div>
<div class="section" id="live-build">
<span id="make-docs-live"></span><h3>live build<a class="headerlink" href="#live-build" title="Permalink to this headline"></a></h3>
<span id="make-docs-live"></span><h3><a class="toc-backref" href="#id8">live build</a><a class="headerlink" href="#live-build" title="Permalink to this headline"></a></h3>
<div class="sidebar">
<p class="sidebar-title">docs-clean</p>
<p>It is recommended to assert a complete rebuild before deploying (use
@ -163,7 +183,7 @@ The HTML pages are in dist/docs.
</div>
</div>
<div class="section" id="deploy-on-github-io">
<span id="id2"></span><h3>deploy on github.io<a class="headerlink" href="#deploy-on-github-io" title="Permalink to this headline"></a></h3>
<span id="id2"></span><h3><a class="toc-backref" href="#id9">deploy on github.io</a><a class="headerlink" href="#deploy-on-github-io" title="Permalink to this headline"></a></h3>
<p>To deploy documentation at <a class="reference external" href="https://asciimoo.github.io/searx/.">github.io</a> use Makefile target
<a class="reference internal" href="makefile.html#make-gh-pages"><span class="std std-ref">make gh-pages</span></a>, which will builds the documentation, clones searx into a sub
folder <code class="docutils literal notranslate"><span class="pre">gh-pages</span></code>, cleans it, copies the doc build into and runs all the
@ -186,6 +206,7 @@ doc available at --&gt; https://asciimoo.github.io/searx
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -237,7 +258,7 @@ doc available at --&gt; https://asciimoo.github.io/searx
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Engine overview &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="contribution_guide.html" title="How to contribute"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Engine overview</a></li>
</ul>
</div>
@ -160,6 +162,10 @@ settings. However, the standard way is the following:</p>
<td><p>string</p></td>
<td><p>specific timeout for search-engine</p></td>
</tr>
<tr class="row-even"><td><p>display_error_messages</p></td>
<td><p>boolean</p></td>
<td><p>display error messages on the web UI</p></td>
</tr>
</tbody>
</table>
</div>
@ -579,6 +585,7 @@ time of publish <em>(not implemented yet)</em></p></td>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -630,7 +637,7 @@ time of publish <em>(not implemented yet)</em></p></td>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Developer documentation &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -32,7 +33,8 @@
<li class="right" >
<a href="../admin/buildhosts.html" title="Buildhosts"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Developer documentation</a></li>
</ul>
</div>
@ -44,20 +46,79 @@
<div class="section" id="developer-documentation">
<h1>Developer documentation<a class="headerlink" href="#developer-documentation" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">Contents</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
<li class="toctree-l1"><a class="reference internal" href="engine_overview.html">Engine overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="search_api.html">Search API</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="translation.html">Translation</a></li>
<li class="toctree-l1"><a class="reference internal" href="makefile.html">Makefile Targets</a></li>
<li class="toctree-l1"><a class="reference internal" href="reST.html">reST primer</a></li>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Development Quickstart</a><ul>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#how-to-setup-your-development-environment">How to setup your development environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#how-to-run-tests">How to run tests</a></li>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#how-to-compile-styles-and-javascript">How to compile styles and javascript</a></li>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#how-to-build-the-source-of-the-themes">How to build the source of the themes</a></li>
<li class="toctree-l2"><a class="reference internal" href="quickstart.html#tips-for-debugging-development">Tips for debugging/development</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="contribution_guide.html">How to contribute</a><ul>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html#prime-directives-privacy-hackability">Prime directives: Privacy, Hackability</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html#code">Code</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html#translation">Translation</a></li>
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html#documentation">Documentation</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="engine_overview.html">Engine overview</a><ul>
<li class="toctree-l2"><a class="reference internal" href="engine_overview.html#general-engine-configuration">general engine configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="engine_overview.html#making-a-request">making a request</a></li>
<li class="toctree-l2"><a class="reference internal" href="engine_overview.html#returned-results">returned results</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="search_api.html">Search API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="search_api.html#parameters">Parameters</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins</a><ul>
<li class="toctree-l2"><a class="reference internal" href="plugins.html#example-plugin">Example plugin</a></li>
<li class="toctree-l2"><a class="reference internal" href="plugins.html#plugin-entry-points">Plugin entry points</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="translation.html">Translation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="translation.html#requirements">Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="translation.html#init-transifex-project">Init Transifex project</a></li>
<li class="toctree-l2"><a class="reference internal" href="translation.html#update-translations">Update translations</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="makefile.html">Makefile Targets</a><ul>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#makefile-setup">Makefile setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#python-environment">Python environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-run"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-clean"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-docs-docs-live-docs-clean"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs-live</span> <span class="pre">docs-clean</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-gh-pages"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">gh-pages</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-test"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-pylint"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pylint</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="makefile.html#make-pybuild"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="reST.html">reST primer</a><ul>
<li class="toctree-l2"><a class="reference internal" href="reST.html#soft-skills">Soft skills</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#basic-inline-markup">Basic inline markup</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#basic-article-structure">Basic article structure</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#anchors-links">Anchors &amp; Links</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#literal-blocks">Literal blocks</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#unicode-substitution">Unicode substitution</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#roles">Roles</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#figures-images">Figures &amp; Images</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#list-markups">List markups</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#admonitions">Admonitions</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#tables">Tables</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#templating">Templating</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#tabbed-views">Tabbed views</a></li>
<li class="toctree-l2"><a class="reference internal" href="reST.html#math-equations">Math equations</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -106,7 +167,7 @@
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Makefile Targets &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="translation.html" title="Translation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Makefile Targets</a></li>
</ul>
</div>
@ -46,16 +48,16 @@
<span id="makefile"></span><h1>Makefile Targets<a class="headerlink" href="#makefile-targets" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">build environment</p>
<p>Before looking deeper at the targets, first read about <a class="reference internal" href="#makefile-setup"><span class="std std-ref">Setup</span></a>
<p>Before looking deeper at the targets, first read about <a class="reference internal" href="#makefile-setup"><span class="std std-ref">Makefile setup</span></a>
and <a class="reference internal" href="#make-pyenv"><span class="std std-ref">Python environment</span></a>.</p>
<p>To install system requirements follow <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a>.</p>
</div>
<p>With the aim to simplify development cycles, started with <a class="reference external" href="https://github.com/asciimoo/searx/pull/1756">PR 1756</a> a
<code class="docutils literal notranslate"><span class="pre">Makefile</span></code> based boilerplate was added. If you are not familiar with
Makefiles, we recommend to read <a class="reference external" href="https://www.gnu.org/software/make/manual/make.html#Introduction">gnu-make</a> introduction.</p>
<p>The usage is simple, just type <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">{target-name}</span></code> to <em>build</em> a target.
Calling the <code class="docutils literal notranslate"><span class="pre">help</span></code> target gives a first overview:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ make help
test - run developer tests
Calling the <code class="docutils literal notranslate"><span class="pre">help</span></code> target gives a first overview (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">help</span></code>):</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span> test - run developer tests
docs - build documentation
docs-live - autobuild HTML documentation while editing
run - run developer instance
@ -63,50 +65,75 @@ Calling the <code class="docutils literal notranslate"><span class="pre">help</s
uninstall - uninstall (./local)
gh-pages - build docs &amp; deploy on gh-pages branch
clean - drop builds and environments
...
project - re-build generic files of the searx project
buildenv - re-build environment files (aka brand)
themes - re-build build the source of the themes
docker - build Docker image
node.env - download &amp; install npm dependencies locally
environment
SEARX_URL = https://searx.me
GIT_URL = https://github.com/asciimoo/searx
DOCS_URL = https://asciimoo.github.io/searx
make V=0|1 [targets] 0 =&gt; quiet build (default), 1 =&gt; verbose build
make V=2 [targets] 2 =&gt; give reason for rebuild of target
to get more help: make help-all
</pre></div>
</div>
<div class="contents local topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#setup" id="id6">Setup</a></p></li>
<li><p><a class="reference internal" href="#python-environment" id="id7">Python environment</a></p></li>
<li><p><a class="reference internal" href="#make-run" id="id8"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-clean" id="id9"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-docs-docs-live-docs-clean" id="id10"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs-live</span> <span class="pre">docs-clean</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-gh-pages" id="id11"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">gh-pages</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-test" id="id12"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-pylint" id="id13"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pylint</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-pybuild" id="id14"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a></p></li>
<li><p><a class="reference internal" href="#makefile-setup" id="id7">Makefile setup</a></p></li>
<li><p><a class="reference internal" href="#python-environment" id="id8">Python environment</a></p></li>
<li><p><a class="reference internal" href="#make-run" id="id9"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-clean" id="id10"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-docs-docs-live-docs-clean" id="id11"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs-live</span> <span class="pre">docs-clean</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-gh-pages" id="id12"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">gh-pages</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-test" id="id13"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-pylint" id="id14"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pylint</span></code></a></p></li>
<li><p><a class="reference internal" href="#make-pybuild" id="id15"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a></p></li>
</ul>
</div>
<div class="section" id="setup">
<span id="makefile-setup"></span><h2><a class="toc-backref" href="#id6">Setup</a><a class="headerlink" href="#setup" title="Permalink to this headline"></a></h2>
<p>The main setup is done in the <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/Makefile">git://Makefile</a>:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>export GIT_URL=https://github.com/asciimoo/searx
export SEARX_URL=https://searx.me
export DOCS_URL=https://asciimoo.github.io/searx
</pre></div>
</div>
<div class="section" id="makefile-setup">
<span id="id1"></span><h2><a class="toc-backref" href="#id7">Makefile setup</a><a class="headerlink" href="#makefile-setup" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">fork &amp; upstream</p>
<p>Commit changes in your (local) branch, fork or whatever, but do not push them
upstream / <a class="reference external" href="https://git-scm.com/docs/git-stash">git stash</a> is your friend.</p>
</div>
<p>The main setup is done in the <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/Makefile">git://Makefile</a>.</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>export GIT_URL=https://github.com/asciimoo/searx
export GIT_BRANCH=master
export SEARX_URL=https://searx.me
export DOCS_URL=https://asciimoo.github.io/searx
</pre></div>
</div>
<dl class="field-list simple">
<dt class="field-odd">GIT_URL</dt>
<dd class="field-odd"><p>Changes this, to point to your searx fork.</p>
</dd>
<dt class="field-even">SEARX_URL</dt>
<dd class="field-even"><p>Changes this, to point to your searx instance.</p>
<dt class="field-even">GIT_BRANCH</dt>
<dd class="field-even"><p>Changes this, to point to your searx branch.</p>
</dd>
<dt class="field-odd">DOCS_URL</dt>
<dd class="field-odd"><p>If you host your own (branded) documentation, change this URL.</p>
<dt class="field-odd">SEARX_URL</dt>
<dd class="field-odd"><p>Changes this, to point to your searx instance.</p>
</dd>
<dt class="field-even">DOCS_URL</dt>
<dd class="field-even"><p>If you host your own (<em>brand</em>) documentation, change this URL.</p>
</dd>
</dl>
<p>If you change any of this build environment variables, you have to run <code class="docutils literal notranslate"><span class="pre">make</span>
<span class="pre">buildenv</span></code>:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ make buildenv
build searx/brand.py
build utils/brand.env
</pre></div>
</div>
</div>
<div class="section" id="python-environment">
<span id="make-pyenv"></span><h2><a class="toc-backref" href="#id7">Python environment</a><a class="headerlink" href="#python-environment" title="Permalink to this headline"></a></h2>
<span id="make-pyenv"></span><h2><a class="toc-backref" href="#id8">Python environment</a><a class="headerlink" href="#python-environment" title="Permalink to this headline"></a></h2>
<div class="sidebar">
<p class="sidebar-title">activate environment</p>
<p><code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">./local/py3/bin/activate</span></code></p>
@ -142,7 +169,7 @@ the <a class="reference external" href="https://github.com/asciimoo/searx/blob/m
<a class="reference internal" href="#make-clean"><span class="std std-ref">make clean</span></a>.</p>
</div>
<div class="section" id="make-run">
<span id="id1"></span><h2><a class="toc-backref" href="#id8"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a><a class="headerlink" href="#make-run" title="Permalink to this headline"></a></h2>
<span id="id2"></span><h2><a class="toc-backref" href="#id9"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a><a class="headerlink" href="#make-run" title="Permalink to this headline"></a></h2>
<p>To get up a running a developer instance simply call <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code>. This enables
<em>debug</em> option in <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a>, starts a <code class="docutils literal notranslate"><span class="pre">./searx/webapp.py</span></code>
instance, disables <em>debug</em> option again and opens the URL in your favorite WEB
@ -158,7 +185,7 @@ INFO:werkzeug: * Running on http://127.0.0.1:8888/ <span class="o">(</span>Press
</div>
</div>
<div class="section" id="make-clean">
<span id="id2"></span><h2><a class="toc-backref" href="#id9"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a><a class="headerlink" href="#make-clean" title="Permalink to this headline"></a></h2>
<span id="id3"></span><h2><a class="toc-backref" href="#id10"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a><a class="headerlink" href="#make-clean" title="Permalink to this headline"></a></h2>
<p>Drop all intermediate files, all builds, but keep sources untouched. Includes
target <code class="docutils literal notranslate"><span class="pre">pyclean</span></code> which drops ./local environment. Before calling <code class="docutils literal notranslate"><span class="pre">make</span>
<span class="pre">clean</span></code> stop all processes using <a class="reference internal" href="#make-pyenv"><span class="std std-ref">Python environment</span></a>.</p>
@ -169,22 +196,22 @@ CLEAN clean
</div>
</div>
<div class="section" id="make-docs-docs-live-docs-clean">
<span id="make-docs"></span><h2><a class="toc-backref" href="#id10"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs-live</span> <span class="pre">docs-clean</span></code></a><a class="headerlink" href="#make-docs-docs-live-docs-clean" title="Permalink to this headline"></a></h2>
<span id="make-docs"></span><h2><a class="toc-backref" href="#id11"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs-live</span> <span class="pre">docs-clean</span></code></a><a class="headerlink" href="#make-docs-docs-live-docs-clean" title="Permalink to this headline"></a></h2>
<p>We describe the usage of the <code class="docutils literal notranslate"><span class="pre">doc*</span></code> targets in the <a class="reference internal" href="contribution_guide.html#contrib-docs"><span class="std std-ref">How to contribute /
Documentation</span></a> section. If you want to edit the documentation
read our <a class="reference internal" href="contribution_guide.html#make-docs-live"><span class="std std-ref">live build</span></a> section. If you are working in your own brand,
adjust your <a class="reference internal" href="#makefile-setup"><span class="std std-ref">Makefile setup</span></a>.</p>
</div>
<div class="section" id="make-gh-pages">
<span id="id3"></span><h2><a class="toc-backref" href="#id11"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">gh-pages</span></code></a><a class="headerlink" href="#make-gh-pages" title="Permalink to this headline"></a></h2>
<span id="id4"></span><h2><a class="toc-backref" href="#id12"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">gh-pages</span></code></a><a class="headerlink" href="#make-gh-pages" title="Permalink to this headline"></a></h2>
<p>To deploy on github.io first adjust your <a class="reference internal" href="#makefile-setup"><span class="std std-ref">Makefile setup</span></a>. For any further read <a class="reference internal" href="contribution_guide.html#deploy-on-github-io"><span class="std std-ref">deploy on github.io</span></a>.</p>
</div>
<div class="section" id="make-test">
<span id="id4"></span><h2><a class="toc-backref" href="#id12"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a><a class="headerlink" href="#make-test" title="Permalink to this headline"></a></h2>
<span id="id5"></span><h2><a class="toc-backref" href="#id13"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a><a class="headerlink" href="#make-test" title="Permalink to this headline"></a></h2>
<p>Runs a series of tests: <code class="docutils literal notranslate"><span class="pre">test.pep8</span></code>, <code class="docutils literal notranslate"><span class="pre">test.unit</span></code>, <code class="docutils literal notranslate"><span class="pre">test.robot</span></code> and does
additional <a class="reference internal" href="#make-pylint"><span class="std std-ref">pylint checks</span></a>. You can run tests selective,
e.g.:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make test.pep8 test.unit
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make test.pep8 test.unit test.sh
. ./local/py3/bin/activate<span class="p">;</span> ./manage.sh pep8_check
<span class="o">[</span>!<span class="o">]</span> Running pep8 check
. ./local/py3/bin/activate<span class="p">;</span> ./manage.sh unit_tests
@ -193,7 +220,7 @@ e.g.:</p>
</div>
</div>
<div class="section" id="make-pylint">
<span id="id5"></span><h2><a class="toc-backref" href="#id13"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pylint</span></code></a><a class="headerlink" href="#make-pylint" title="Permalink to this headline"></a></h2>
<span id="id6"></span><h2><a class="toc-backref" href="#id14"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pylint</span></code></a><a class="headerlink" href="#make-pylint" title="Permalink to this headline"></a></h2>
<p>Before commiting its recommend to do some (more) linting. <a class="reference external" href="https://www.pylint.org/">Pylint</a> is known as
one of the best source-code, bug and quality checker for the Python programming
language. <a class="reference external" href="https://www.pylint.org/">Pylint</a> is not yet a quality gate within our searx project (like
@ -207,7 +234,7 @@ day, the linting is balanced out, we might decide to add Pylint as a quality
gate.</p>
</div>
<div class="section" id="make-pybuild">
<h2><a class="toc-backref" href="#id14"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a><a class="headerlink" href="#make-pybuild" title="Permalink to this headline"></a></h2>
<h2><a class="toc-backref" href="#id15"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">pybuild</span></code></a><a class="headerlink" href="#make-pybuild" title="Permalink to this headline"></a></h2>
<p>Build Python packages in <code class="docutils literal notranslate"><span class="pre">./dist/py</span></code>.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ make pybuild
...
@ -226,6 +253,7 @@ never need the latter.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -277,7 +305,7 @@ never need the latter.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Plugins &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="search_api.html" title="Search API"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Plugins</a></li>
</ul>
</div>
@ -92,6 +94,7 @@ plugin.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -143,7 +146,7 @@ plugin.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Development Quickstart &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="index.html" title="Developer documentation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Development Quickstart</a></li>
</ul>
</div>
@ -62,7 +64,7 @@ searx-ve virtualenv and install the required packages using <code class="docutil
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">cd</span> ~/myprojects
git clone https://github.com/asciimoo/searx.git
<span class="nb">cd</span> searx
virtualenv searx-ve
python3 -m venv searx-ve
. ./searx-ve/bin/activate
./manage.sh update_dev_packages
</pre></div>
@ -109,16 +111,16 @@ sudo -H npm install -g less
</div>
</div>
</div>
<div class="section" id="how-to-build-the-source-of-the-oscar-theme">
<h2>How to build the source of the oscar theme<a class="headerlink" href="#how-to-build-the-source-of-the-oscar-theme" title="Permalink to this headline"></a></h2>
<div class="section" id="how-to-build-the-source-of-the-themes">
<h2>How to build the source of the themes<a class="headerlink" href="#how-to-build-the-source-of-the-themes" title="Permalink to this headline"></a></h2>
<p><a class="reference external" href="https://gruntjs.com/">Grunt</a> must be installed in order to build the javascript sources. It depends on
NodeJS, so first Node has to be installed.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>sudo -H apt-get install nodejs
sudo -H npm install -g grunt-cli
make node.env
</pre></div>
</div>
<p>After installing grunt, the files can be built using the following command:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>./manage.sh grunt_build
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>make themes
</pre></div>
</div>
</div>
@ -151,6 +153,7 @@ must be created containing these format fixes. This phase can be skipped if
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -202,7 +205,7 @@ must be created containing these format fixes. This phase can be skipped if
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>reST primer &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -15,7 +16,7 @@
<script src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Blog" href="../blog/index.html" />
<link rel="next" title="Tooling box utils/*" href="../utils/index.html" />
<link rel="prev" title="Makefile Targets" href="makefile.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
@ -27,13 +28,14 @@
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../blog/index.html" title="Blog"
<a href="../utils/index.html" title="Tooling box utils/*"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="makefile.html" title="Makefile Targets"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">reST primer</a></li>
</ul>
</div>
@ -365,11 +367,11 @@ content becomes smart.</p>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-rfc" title="(in Sphinx v4.0.0+/b1400ac42)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">rfc</span></code></a></p></td>
<tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-rfc" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">rfc</span></code></a></p></td>
<td><p><span class="target" id="index-0"></span><a class="rfc reference external" href="https://tools.ietf.org/html/rfc822.html"><strong>RFC 822</strong></a></p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:rfc:`822`</span></code></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-pep" title="(in Sphinx v4.0.0+/b1400ac42)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">pep</span></code></a></p></td>
<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-pep" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">pep</span></code></a></p></td>
<td><p><span class="target" id="index-1"></span><a class="pep reference external" href="https://www.python.org/dev/peps/pep-0008"><strong>PEP 8</strong></a></p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:pep:`8`</span></code></p></td>
</tr>
@ -442,8 +444,9 @@ content becomes smart.</p>
<div class="section" id="literal-blocks">
<h2><a class="toc-backref" href="#id24">Literal blocks</a><a class="headerlink" href="#literal-blocks" title="Permalink to this headline"></a></h2>
<p>The simplest form of <a class="reference external" href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#literal-blocks">literal-blocks</a> is a indented block introduced by
two colons (<code class="docutils literal notranslate"><span class="pre">::</span></code>). For highlighting use <a class="reference external" href="http://docutils.sourceforge.net/docs/ref/rst/directives.html#highlight">highlight</a> or <a class="reference internal" href="#rest-code"><span class="std std-ref">code-block</span></a> directive. To include literals from external files use directive
<a class="reference external" href="http://docutils.sourceforge.net/docs/ref/rst/directives.html#literalinclude">literalinclude</a>.</p>
two colons (<code class="docutils literal notranslate"><span class="pre">::</span></code>). For highlighting use <a class="reference external" href="http://docutils.sourceforge.net/docs/ref/rst/directives.html#highlight">highlight</a> or <a class="reference internal" href="#rest-code"><span class="std std-ref">code-block</span></a> directive. To include literals from external files use
<a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-literalinclude" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">literalinclude</span></code></a> or <a class="reference external" href="https://return42.github.io/linuxdoc/linuxdoc-howto/kernel-include-directive.html#kernel-include-directive" title="(in LinuxDoc v20181010)"><span class="xref std std-ref">kernel-include</span></a>
directive (latter one expands environment variables in the path name).</p>
<div class="section" id="rest-literal">
<span id="id3"></span><h3><a class="toc-backref" href="#id25"><code class="docutils literal notranslate"><span class="pre">::</span></code></a><a class="headerlink" href="#rest-literal" title="Permalink to this headline"></a></h3>
<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="se">::</span>
@ -482,9 +485,9 @@ eirmod tempor invidunt ut labore</p>
<p class="sidebar-title">Syntax highlighting</p>
<p>is handled by <a class="reference external" href="https://pygments.org/languages/">pygments</a>.</p>
</div>
<p>The <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code-block" title="(in Sphinx v4.0.0+/b1400ac42)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">code-block</span></code></a> directive is a variant of the <a class="reference external" href="http://docutils.sourceforge.net/docs/ref/rst/directives.html#code">code</a> directive
<p>The <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code-block" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">code-block</span></code></a> directive is a variant of the <a class="reference external" href="http://docutils.sourceforge.net/docs/ref/rst/directives.html#code">code</a> directive
with additional options. To learn more about code literals visit
<a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#code-examples" title="(in Sphinx v4.0.0+/b1400ac42)"><span>Showing code examples</span></a>.</p>
<a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#code-examples" title="(in Sphinx v4.0.0+)"><span>Showing code examples</span></a>.</p>
<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>The URL <span class="s">``/stats``</span> handle is shown in <span class="na">:ref:</span><span class="nv">`stats-handle`</span>
<span class="p">..</span> <span class="ow">code-block</span><span class="p">::</span> Python
@ -507,7 +510,7 @@ with additional options. To learn more about code literals visit
<p class="admonition-title">Code block</p>
<p>The URL <code class="docutils literal notranslate"><span class="pre">/stats</span></code> handle is shown in <a class="reference internal" href="#stats-handle"><span class="std std-ref">python code block</span></a></p>
<div class="literal-block-wrapper docutils container" id="stats-handle">
<div class="code-block-caption"><span class="caption-number">Listing 2 </span><span class="caption-text">python code block</span><a class="headerlink" href="#stats-handle" title="Permalink to this code"></a></div>
<div class="code-block-caption"><span class="caption-number">Listing 1 </span><span class="caption-text">python code block</span><a class="headerlink" href="#stats-handle" title="Permalink to this code"></a></div>
<div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="nd">@app.route</span><span class="p">(</span><span class="s1">&#39;/stats&#39;</span><span class="p">,</span> <span class="n">methods</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;GET&#39;</span><span class="p">])</span>
<span class="k">def</span> <span class="nf">stats</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;Render engine statistics page.&quot;&quot;&quot;</span>
@ -543,7 +546,7 @@ Trademark |(TM)| and copyright |copy| glyphs.
<p class="sidebar-title">Further reading</p>
<ul class="simple">
<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html">Sphinx Roles</a></p></li>
<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html" title="(in Sphinx v4.0.0+/b1400ac42)"><span>Domains</span></a></p></li>
<li><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html" title="(in Sphinx v4.0.0+)"><span>Domains</span></a></p></li>
</ul>
</div>
<p>A <em>custom interpreted text role</em> (<a class="reference external" href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#roles">ref</a>) is an inline piece of
@ -568,31 +571,31 @@ in a specific way.</p>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-guilabel" title="(in Sphinx v4.0.0+/b1400ac42)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">guilabel</span></code></a></p></td>
<tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-guilabel" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">guilabel</span></code></a></p></td>
<td><p><span class="guilabel"><span class="accelerator">C</span>ancel</span></p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:guilabel:`&amp;Cancel`</span></code></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-kbd" title="(in Sphinx v4.0.0+/b1400ac42)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">kbd</span></code></a></p></td>
<td><p><kbd class="kbd docutils literal notranslate">C-x C-f</kbd></p></td>
<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-kbd" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">kbd</span></code></a></p></td>
<td><p><kbd class="kbd docutils literal notranslate"><kbd class="kbd docutils literal notranslate">C</kbd>-<kbd class="kbd docutils literal notranslate">x</kbd> <kbd class="kbd docutils literal notranslate">C</kbd>-<kbd class="kbd docutils literal notranslate">f</kbd></kbd></p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:kbd:`C-x</span> <span class="pre">C-f`</span></code></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-menuselection" title="(in Sphinx v4.0.0+/b1400ac42)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">menuselection</span></code></a></p></td>
<tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-menuselection" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">menuselection</span></code></a></p></td>
<td><p><span class="menuselection">Open ‣ File</span></p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:menuselection:`Open</span> <span class="pre">--&gt;</span> <span class="pre">File`</span></code></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-download" title="(in Sphinx v4.0.0+/b1400ac42)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">download</span></code></a></p></td>
<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-download" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">download</span></code></a></p></td>
<td><p><a class="reference download internal" download="" href="../_downloads/ad0ebe55d6b53b1559e0ca8dee6f30b9/reST.rst"><code class="xref download docutils literal notranslate"><span class="pre">this</span> <span class="pre">file</span></code></a></p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:download:`this</span> <span class="pre">file</span> <span class="pre">&lt;reST.rst&gt;`</span></code></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#math">math</a></p></td>
<td><p><span class="math">a^2 + b^2 = c^2</span></p></td>
<td><p><img class="math" src="../_images/math/6673b43f9fe29455c1fcd1164e5844698cc64d38.svg" alt="a^2 + b^2 = c^2"/></p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:math:`a^2</span> <span class="pre">+</span> <span class="pre">b^2</span> <span class="pre">=</span> <span class="pre">c^2`</span></code></p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-ref" title="(in Sphinx v4.0.0+/b1400ac42)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">ref</span></code></a></p></td>
<tr class="row-odd"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-ref" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">ref</span></code></a></p></td>
<td><p><a class="reference internal" href="#svg-image-example"><span class="std std-ref">Simple SVG image.</span></a></p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:ref:`svg</span> <span class="pre">image</span> <span class="pre">example`</span></code></p></td>
</tr>
<tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-command" title="(in Sphinx v4.0.0+/b1400ac42)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">command</span></code></a></p></td>
<tr class="row-even"><td><p><a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-command" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">command</span></code></a></p></td>
<td><p><strong class="command">ls -la</strong></p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:command:`ls</span> <span class="pre">-la`</span></code></p></td>
</tr>
@ -784,7 +787,7 @@ item uses two lines.</p></li>
</div>
<div class="section" id="horizontal-list">
<h3><a class="toc-backref" href="#id35">Horizontal list</a><a class="headerlink" href="#horizontal-list" title="Permalink to this headline"></a></h3>
<p>The <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-hlist" title="(in Sphinx v4.0.0+/b1400ac42)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">..</span> <span class="pre">hlist::</span></code></a> transforms a bullet list into a more compact
<p>The <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-hlist" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">..</span> <span class="pre">hlist::</span></code></a> transforms a bullet list into a more compact
list.</p>
<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span><span class="p">..</span> <span class="ow">hlist</span><span class="p">::</span>
@ -1423,6 +1426,7 @@ build chapter: <a class="reference internal" href="../admin/engines.html#engines
<span class="m">-</span> O
<span class="m">-</span> W
<span class="m">-</span> D
<span class="m">-</span> DE
{% for name, mod in engines.items() %}
@ -1439,6 +1443,7 @@ build chapter: <a class="reference internal" href="../admin/engines.html#engines
<span class="m">-</span> {{(mod.offline and &quot;y&quot;) or &quot;&quot;}}
<span class="m">-</span> {{mod.weight or 1 }}
<span class="m">-</span> {{(mod.disabled and &quot;y&quot;) or &quot;&quot;}}
<span class="m">-</span> {{(mod.display_error_messages and &quot;y&quot;) or &quot;&quot;}}
{% endfor %}
</pre></div>
@ -1465,44 +1470,19 @@ others are <a class="reference external" href="https://github.com/djungelorm/sph
<span class="p"> ..</span> <span class="ow">code-block</span><span class="p">::</span> <span class="k">sh</span>
$ sudo apt install graphviz imagemagick texlive-xetex librsvg2-bin
$ sudo apt install shellcheck
<span class="p"> ..</span> <span class="ow">group-tab</span><span class="p">::</span> Arch Linux
<span class="p"> ..</span> <span class="ow">code-block</span><span class="p">::</span> <span class="k">sh</span>
$ sudo pacman -S graphviz imagemagick texlive-bin extra/librsvg
$ sudo pacman -S shellcheck
<span class="p"> ..</span> <span class="ow">group-tab</span><span class="p">::</span> Fedora / RHEL
<span class="p"> ..</span> <span class="ow">code-block</span><span class="p">::</span> <span class="k">sh</span>
<span class="p"> ..</span> <span class="ow">code-block</span><span class="p">::</span> sh
$ sudo dnf install graphviz graphviz-gd texlive-xetex-bin librsvg2-tools
For PDF output you also need:
<span class="p">..</span> <span class="ow">tabs</span><span class="p">::</span>
<span class="p"> ..</span> <span class="ow">group-tab</span><span class="p">::</span> Ubuntu / debian
<span class="p"> ..</span> <span class="ow">code</span><span class="p">::</span> <span class="k">sh</span>
$ sudo apt texlive-latex-recommended texlive-extra-utils ttf-dejavu
<span class="p"> ..</span> <span class="ow">group-tab</span><span class="p">::</span> Arch Linux
<span class="p"> ..</span> <span class="ow">code</span><span class="p">::</span> <span class="k">sh</span>
$ sudo pacman -S texlive-core texlive-latexextra ttf-dejavu
<span class="p"> ..</span> <span class="ow">group-tab</span><span class="p">::</span> Fedora / RHEL
<span class="p"> ..</span> <span class="ow">code</span><span class="p">::</span> sh
$ sudo dnf install \
texlive-collection-fontsrecommended texlive-collection-latex \
dejavu-sans-fonts dejavu-serif-fonts dejavu-sans-mono-fonts
$ sudo dnf install ShellCheck
</pre></div>
</div>
</div>
@ -1518,8 +1498,8 @@ For PDF output you also need:
</div>
<p>The input language for mathematics is LaTeX markup using the <a class="reference external" href="https://ctan.org/pkg/amsmath">CTAN: amsmath</a>
package.</p>
<p>To embed LaTeX markup in reST documents, use role <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-math" title="(in Sphinx v4.0.0+/b1400ac42)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">:math:</span></code></a> for
inline and directive <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-math" title="(in Sphinx v4.0.0+/b1400ac42)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">..</span> <span class="pre">math::</span></code></a> for block markup.</p>
<p>To embed LaTeX markup in reST documents, use role <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-math" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-role docutils literal notranslate"><span class="pre">:math:</span></code></a> for
inline and directive <a class="reference external" href="https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-math" title="(in Sphinx v4.0.0+)"><code class="xref rst rst-dir docutils literal notranslate"><span class="pre">..</span> <span class="pre">math::</span></code></a> for block markup.</p>
<div class="highlight-reST notranslate"><div class="highlight"><pre><span></span>In <span class="na">:math:numref:</span><span class="nv">`schroedinger general`</span> the time-dependent Schrödinger equation
is shown.
@ -1535,8 +1515,8 @@ is shown.
<p>In <a class="reference internal" href="#equation-schroedinger-general">(1)</a> the time-dependent Schrödinger equation
is shown.</p>
<div class="math" id="equation-schroedinger-general">
<p><span class="eqno">(1)<a class="headerlink" href="#equation-schroedinger-general" title="Permalink to this equation"></a></span><span class="math">\mathrm{i}\hbar\dfrac{\partial}{\partial t} |\,\psi (t) \rangle =
\hat{H} |\,\psi (t) \rangle.</span></p>
<p><span class="eqno">(1)<a class="headerlink" href="#equation-schroedinger-general" title="Permalink to this equation"></a></span><img src="../_images/math/a6a994cb6e7278ec30eaebe7e636046d3deccb5b.svg" alt="\mathrm{i}\hbar\dfrac{\partial}{\partial t} |\,\psi (t) \rangle =
\hat{H} |\,\psi (t) \rangle."/></p>
</div></div>
<p>The next example shows the difference of <code class="docutils literal notranslate"><span class="pre">\tfrac</span></code> (<em>textstyle</em>) and <code class="docutils literal notranslate"><span class="pre">\dfrac</span></code>
(<em>displaystyle</em>) used in a inline markup or another fraction.</p>
@ -1549,13 +1529,13 @@ is shown.</p>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua. …
<code class="docutils literal notranslate"><span class="pre">\tfrac</span></code> <strong>inline example</strong> <span class="math">\tfrac{\tfrac{1}{x}+\tfrac{1}{y}}{y-z}</span>
<code class="docutils literal notranslate"><span class="pre">\tfrac</span></code> <strong>inline example</strong> <img class="math" src="../_images/math/3b8127a8eed95247f9249ea6c85e8e86df1baa82.svg" alt="\tfrac{\tfrac{1}{x}+\tfrac{1}{y}}{y-z}"/>
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
voluptua. …
<code class="docutils literal notranslate"><span class="pre">\tfrac</span></code> <strong>inline example</strong> <span class="math">\dfrac{\dfrac{1}{x}+\dfrac{1}{y}}{y-z}</span>
<code class="docutils literal notranslate"><span class="pre">\tfrac</span></code> <strong>inline example</strong> <img class="math" src="../_images/math/07c9ff4251510b06013159f4e45ec9ab97044096.svg" alt="\dfrac{\dfrac{1}{x}+\dfrac{1}{y}}{y-z}"/>
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
</div>
@ -1563,6 +1543,7 @@ gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -1592,7 +1573,7 @@ gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<li><a href="index.html">Developer documentation</a>
<ul>
<li>Previous: <a href="makefile.html" title="previous chapter">Makefile Targets</a>
<li>Next: <a href="../blog/index.html" title="next chapter">Blog</a></ul>
<li>Next: <a href="../utils/index.html" title="next chapter">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a></ul>
</li>
</ul>
</li>
@ -1614,7 +1595,7 @@ gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Search API &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="engine_overview.html" title="Engine overview"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Search API</a></li>
</ul>
</div>
@ -141,6 +143,7 @@ instance. See the available options in the preferences page of the instance.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -192,7 +195,7 @@ instance. See the available options in the preferences page of the instance.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Translation &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="plugins.html" title="Plugins"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Translation</a></li>
</ul>
</div>
@ -95,6 +97,7 @@ create a PR.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -146,7 +149,7 @@ create a PR.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Index &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="_static/searx.css" type="text/css" />
@ -31,7 +31,8 @@
<li class="right" style="margin-right: 10px">
<a href="#" title="General Index"
accesskey="I">index</a></li>
<li class="nav-item nav-item-0"><a href="index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Index</a></li>
</ul>
</div>
@ -76,6 +77,7 @@
<div class="clearer"></div>
</div>
</div>
</div>
@ -121,7 +123,7 @@
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Welcome to searx &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="_static/searx.css" type="text/css" />
@ -28,7 +29,8 @@
<li class="right" >
<a href="user/index.html" title="User documentation"
accesskey="N">next</a> |</li>
<li class="nav-item nav-item-0"><a href="#">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="#">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Welcome to searx</a></li>
</ul>
</div>
@ -39,7 +41,14 @@
<div class="section" id="welcome-to-searx">
<h1>Welcome to searx<a class="headerlink" href="#welcome-to-searx" title="Permalink to this headline"></a></h1>
<p>Search without being tracked.</p>
<blockquote>
<div><p><em>Search without being tracked.</em></p>
</div></blockquote>
<p>Searx is a free internet metasearch engine which aggregates results from more
than 70 search services. Users are neither tracked nor profiled. Additionally,
searx can be used over Tor for online anonymity.</p>
<p>Get started with searx by using one of the <a class="reference external" href="https://searx.space">Searx-instances</a>. If you dont trust
anyone, you can set up your own, see <a class="reference internal" href="admin/installation.html#installation"><span class="std std-ref">Installation</span></a>.</p>
<div class="sidebar">
<p class="sidebar-title">Features</p>
<ul class="simple">
@ -54,12 +63,8 @@
digital rights</p></li>
</ul>
</div>
<p>Searx is a free internet metasearch engine which aggregates results from more
than 70 search services. Users are neither tracked nor profiled. Additionally,
searx can be used over Tor for online anonymity.</p>
<p>Get started with searx by using one of the <a class="reference external" href="https://searx.space">Searx-instances</a>. If you dont trust
anyone, you can set up your own, see <a class="reference internal" href="admin/installation.html#installation"><span class="std std-ref">Installation</span></a>.</p>
<div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">Contents</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="user/index.html">User documentation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="user/search_syntax.html">Search syntax</a></li>
@ -68,6 +73,12 @@ anyone, you can set up your own, see <a class="reference internal" href="admin/i
</li>
<li class="toctree-l1"><a class="reference internal" href="admin/index.html">Administrator documentation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="admin/installation.html">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin/installation-searx.html">Step by step installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin/installation-uwsgi.html">uwsgi</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin/installation-nginx.html">Install with nginx</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin/installation-apache.html">Install with apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin/installation-docker.html">Docker installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin/update-searx.html">How to update</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin/settings.html"><code class="docutils literal notranslate"><span class="pre">settings.yml</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="admin/api.html">Administration API</a></li>
<li class="toctree-l2"><a class="reference internal" href="admin/architecture.html">Architecture</a></li>
@ -89,6 +100,15 @@ anyone, you can set up your own, see <a class="reference internal" href="admin/i
<li class="toctree-l2"><a class="reference internal" href="dev/reST.html">reST primer</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="utils/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="utils/searx.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searx.sh</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="utils/filtron.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/filtron.sh</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="utils/morty.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/morty.sh</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="utils/lxc.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="utils/index.html#common-commands-environment">Common commands &amp; environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="utils/index.html#tooling-box-setup">Tooling box setup</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="blog/index.html">Blog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="blog/python3.html">Introducing Python 3 support</a></li>
<li class="toctree-l2"><a class="reference internal" href="blog/admin.html">Searx admin interface</a></li>
@ -101,6 +121,7 @@ anyone, you can set up your own, see <a class="reference internal" href="admin/i
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -149,7 +170,7 @@ anyone, you can set up your own, see <a class="reference internal" href="admin/i
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="_static/version_warning_offset.js"></script>

Binary file not shown.

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Search &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="_static/searx.css" type="text/css" />
@ -35,7 +36,8 @@
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="nav-item nav-item-0"><a href="index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Search</a></li>
</ul>
</div>
@ -53,10 +55,8 @@
</p>
</div>
<p>
From here you can search these documents. Enter your search
words into the box below and click "search". Note that the search
function will automatically search for all of the words. Pages
containing fewer words won't appear in the result list.
Searching for multiple words only shows matches that contain
all words.
</p>
<form action="" method="get">
<input type="text" name="q" aria-labelledby="search-documentation" value="" />
@ -68,6 +68,7 @@
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -103,7 +104,7 @@
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="_static/version_warning_offset.js"></script>

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>User documentation &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -32,7 +33,8 @@
<li class="right" >
<a href="../index.html" title="Welcome to searx"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">User documentation</a></li>
</ul>
</div>
@ -44,14 +46,23 @@
<div class="section" id="user-documentation">
<h1>User documentation<a class="headerlink" href="#user-documentation" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">Contents</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="search_syntax.html">Search syntax</a></li>
<li class="toctree-l1"><a class="reference internal" href="own-instance.html">Why use a private instance?</a></li>
<li class="toctree-l1"><a class="reference internal" href="search_syntax.html">Search syntax</a><ul>
<li class="toctree-l2"><a class="reference internal" href="search_syntax.html#examples">Examples</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="own-instance.html">Why use a private instance?</a><ul>
<li class="toctree-l2"><a class="reference internal" href="own-instance.html#how-does-searx-protect-privacy">How does searx protect privacy?</a></li>
<li class="toctree-l2"><a class="reference internal" href="own-instance.html#conclusion">Conclusion</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -100,7 +111,7 @@
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Why use a private instance? &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="search_syntax.html" title="Search syntax"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">User documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">User documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Why use a private instance?</a></li>
</ul>
</div>
@ -44,8 +46,11 @@
<div class="section" id="why-use-a-private-instance">
<h1>Why use a private instance?<a class="headerlink" href="#why-use-a-private-instance" title="Permalink to this headline"></a></h1>
<p>“Is it worth to run my own instance?” is a common question among searx users.
Before answering this question, see what options a searx user has.</p>
<blockquote>
<div><p><em>“Is it worth to run my own instance?”</em></p>
</div></blockquote>
<p>.. is a common question among searx users. Before answering this question,
see what options a searx user has.</p>
<p>Public instances are open to everyone who has access to its URL. Usually, these
are operated by unknown parties (from the users point of view). Private
instances can be used by a select group of people. It is for example a searx of
@ -110,6 +115,7 @@ instance, have access to a privacy respecting search service.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -161,7 +167,7 @@ instance, have access to a privacy respecting search service.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

View File

@ -1,9 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Search syntax &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
@ -33,7 +34,8 @@
<a href="index.html" title="User documentation"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">User documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">User documentation</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Search syntax</a></li>
</ul>
</div>
@ -78,6 +80,7 @@ categories and languages.</p>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
@ -129,7 +132,7 @@ categories and languages.</p>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.4.4.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>

304
utils/filtron.sh.html Normal file
View File

@ -0,0 +1,304 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>utils/filtron.sh &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script src="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
<script src="../_static/sphinx_tabs/tabs.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="utils/morty.sh" href="morty.sh.html" />
<link rel="prev" title="utils/searx.sh" href="searx.sh.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="morty.sh.html" title="utils/morty.sh"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="searx.sh.html" title="utils/searx.sh"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">utils/filtron.sh</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="utils-filtron-sh">
<span id="filtron-sh"></span><h1><code class="docutils literal notranslate"><span class="pre">utils/filtron.sh</span></code><a class="headerlink" href="#utils-filtron-sh" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">further reading</p>
<ul class="simple">
<li><p><a class="reference internal" href="../admin/filtron.html#searx-filtron"><span class="std std-ref">How to protect an instance</span></a></p></li>
<li><p><a class="reference internal" href="../admin/architecture.html#architecture"><span class="std std-ref">Architecture</span></a></p></li>
<li><p><a class="reference internal" href="../admin/installation.html#installation"><span class="std std-ref">Installation</span></a> (<a class="reference internal" href="../admin/installation-nginx.html#installation-nginx"><span class="std std-ref">nginx</span></a> &amp; <a class="reference internal" href="../admin/installation-apache.html#installation-apache"><span class="std std-ref">apache</span></a>)</p></li>
</ul>
</div>
<p>To simplify installation and maintenance of a filtron instance you can use the
script <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/utils/filtron.sh">git://utils/filtron.sh</a>. In most cases you will install <a class="reference external" href="https://github.com/asciimoo/filtron">filtron</a>
simply by running the command:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/filtron.sh install all
</pre></div>
</div>
<p>The script adds a <code class="docutils literal notranslate"><span class="pre">${SERVICE_USER}</span></code> (default:<code class="docutils literal notranslate"><span class="pre">filtron</span></code>) and installs <a class="reference external" href="https://github.com/asciimoo/filtron">filtron</a>
into this user account:</p>
<ol class="arabic simple">
<li><p>Create a separated user account (<code class="docutils literal notranslate"><span class="pre">filtron</span></code>).</p></li>
<li><p>Download and install <a class="reference external" href="https://golang.org/">Go</a> binary in users $HOME (<code class="docutils literal notranslate"><span class="pre">~filtron</span></code>).</p></li>
<li><p>Install filtron with the package management from <a class="reference external" href="https://golang.org/">Go</a> (<code class="docutils literal notranslate"><span class="pre">go</span> <span class="pre">get</span> <span class="pre">-v</span> <span class="pre">-u</span>
<span class="pre">github.com/asciimoo/filtron</span></code>)</p></li>
<li><p>Setup a proper rule configuration <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/utils/templates/etc/filtron/rules.json">[ref]</a> (<code class="docutils literal notranslate"><span class="pre">/etc/filtron/rules.json</span></code>).</p></li>
<li><p>Setup a systemd service unit <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/utils/templates/lib/systemd/system/filtron.service">[ref]</a>
(<code class="docutils literal notranslate"><span class="pre">/lib/systemd/system/filtron.service</span></code>).</p></li>
</ol>
<div class="section" id="create-user">
<h2>Create user<a class="headerlink" href="#create-user" title="Permalink to this headline"></a></h2>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
<div class="docutils container">
<p>bash</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H useradd --shell /bin/bash --system <span class="se">\</span>
--home-dir /usr/local/filtron <span class="se">\</span>
--comment Privacy-respecting metasearch engine filtron
$ sudo -H mkdir /usr/local/filtron
$ sudo -H chown -R filtron:filtron /usr/local/filtron
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="install-go">
<h2>Install go<a class="headerlink" href="#install-go" title="Permalink to this headline"></a></h2>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
<div class="docutils container">
<p>bash</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ cat &gt; /usr/local/filtron/.go_env <span class="s">&lt;&lt;EOF</span>
<span class="s">export GOPATH=/usr/local/filtron/go-apps</span>
<span class="s">export PATH=$PATH:/usr/local/filtron/local/go/bin:$GOPATH/bin</span>
<span class="s">EOF</span>
$ sudo -i -u filtron
<span class="o">(</span>filtron<span class="o">)</span> $ <span class="nb">echo</span> <span class="s1">&#39;source /usr/local/filtron/.go_env&#39;</span> &gt;&gt; ~/.profile
<span class="o">(</span>filtron<span class="o">)</span> $ mkdir /usr/local/filtron/local
<span class="o">(</span>filtron<span class="o">)</span> $ wget --progress<span class="o">=</span>bar -O go1.13.5.linux-amd64.tar.gz <span class="se">\</span>
https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz
<span class="o">(</span>filtron<span class="o">)</span> $ tar -C /usr/local/filtron/local/go -xzf go1.13.5.linux-amd64.tar.gz
<span class="o">(</span>filtron<span class="o">)</span> $ which go
/usr/local/filtron/local/go/bin/go
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="install-filtron">
<h2>Install filtron<a class="headerlink" href="#install-filtron" title="Permalink to this headline"></a></h2>
<p>Install <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/utils/templates/etc/filtron/rules.json">rules.json</a> at
<code class="docutils literal notranslate"><span class="pre">/etc/filtron/rules.json</span></code> (see <a class="reference internal" href="../admin/filtron.html#sample-configuration-of-filtron"><span class="std std-ref">Sample configuration of filtron</span></a>) and
install filtron software and systemd unit:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
<div class="docutils container">
<p>bash</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo -i -u filtron
<span class="o">(</span>filtron<span class="o">)</span> $ go get -v -u github.com/asciimoo/filtron
</pre></div>
</div>
</div>
</div>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-c3lzdGVtZA== docutils container">
<div class="docutils container">
<p>systemd</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-c3lzdGVtZA== active docutils container">
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="o">[</span>Unit<span class="o">]</span>
<span class="nv">Description</span><span class="o">=</span>filtron
<span class="nv">After</span><span class="o">=</span>syslog.target
<span class="nv">After</span><span class="o">=</span>network.target
<span class="o">[</span>Service<span class="o">]</span>
<span class="nv">Type</span><span class="o">=</span>simple
<span class="nv">User</span><span class="o">=</span>filtron
<span class="nv">Group</span><span class="o">=</span>filtron
<span class="nv">WorkingDirectory</span><span class="o">=</span>/usr/local/filtron
<span class="nv">ExecStart</span><span class="o">=</span>/usr/local/filtron/go-apps/bin/filtron -api <span class="s1">&#39;127.0.0.1:4005&#39;</span> -listen <span class="s1">&#39;127.0.0.1:4004&#39;</span> -rules <span class="s1">&#39;/etc/filtron/rules.json&#39;</span> -target <span class="s1">&#39;127.0.0.1:8888&#39;</span>
<span class="nv">Restart</span><span class="o">=</span>always
<span class="nv">Environment</span><span class="o">=</span><span class="nv">USER</span><span class="o">=</span>filtron <span class="nv">HOME</span><span class="o">=</span>/usr/local/filtron
<span class="c1"># Some distributions may not support these hardening directives. If you cannot</span>
<span class="c1"># start the service due to an unknown option, comment out the ones not supported</span>
<span class="c1"># by your version of systemd.</span>
<span class="nv">ProtectSystem</span><span class="o">=</span>full
<span class="nv">PrivateDevices</span><span class="o">=</span>yes
<span class="nv">PrivateTmp</span><span class="o">=</span>yes
<span class="nv">NoNewPrivileges</span><span class="o">=</span><span class="nb">true</span>
<span class="o">[</span>Install<span class="o">]</span>
<span class="nv">WantedBy</span><span class="o">=</span>multi-user.target
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="overview">
<span id="filtron-sh-overview"></span><h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">--help</span></code> output of the script is largely self-explanatory
(<a class="reference internal" href="index.html#toolboxing-common"><span class="std std-ref">Common commands &amp; environment</span></a>):</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>usage::
filtron.sh shell
filtron.sh install [all|user|rules]
filtron.sh update [filtron]
filtron.sh remove [all]
filtron.sh activate [service]
filtron.sh deactivate [service]
filtron.sh inspect [service]
filtron.sh option [debug-on|debug-off]
filtron.sh apache [install|remove]
filtron.sh nginx [install|remove]
shell
start interactive shell from user filtron
install / remove
:all: complete setup of filtron service
:user: add/remove service user &#39;filtron&#39; (/usr/local/filtron)
:rules: reinstall filtron rules /etc/filtron/rules.json
update filtron
Update filtron installation (/usr/local/filtron)
activate service
activate and start service daemon (systemd unit)
deactivate service
stop and deactivate service daemon (systemd unit)
inspect service
show service status and log
option
set one of the available options
apache (http://192.168.1.127/searx)
:install: apache site with a reverse proxy (ProxyPass)
:remove: apache site searx.conf
nginx (http://192.168.1.127/searx)
:install: nginx site with a reverse proxy (ProxyPass)
:remove: nginx site searx.conf
filtron rules: /etc/filtron/rules.json
If needed, set PUBLIC_URL of your WEB service in the &#39;.config.sh&#39; file::
PUBLIC_URL : http://192.168.1.127/searx
PUBLIC_HOST : 192.168.1.127
SERVICE_USER : filtron
FILTRON_TARGET : 127.0.0.1:8888
FILTRON_API : 127.0.0.1:4005
FILTRON_LISTEN : 127.0.0.1:4004
</pre></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://searx.space/">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a>
<ul>
<li>Previous: <a href="searx.sh.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">utils/searx.sh</span></code></a>
<li>Next: <a href="morty.sh.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">utils/morty.sh</span></code></a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

220
utils/index.html Normal file
View File

@ -0,0 +1,220 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tooling box utils/* &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="utils/searx.sh" href="searx.sh.html" />
<link rel="prev" title="reST primer" href="../dev/reST.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="searx.sh.html" title="utils/searx.sh"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../dev/reST.html" title="reST primer"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-this"><a href="">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="tooling-box-utils">
<span id="toolboxing"></span><span id="searx-utils"></span><h1>Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code><a class="headerlink" href="#tooling-box-utils" title="Permalink to this headline"></a></h1>
<p>In the folder <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/utils/">git://utils/</a> we maintain some tools useful for admins and
developers.</p>
<div class="toctree-wrapper compound">
<p class="caption"><span class="caption-text">Contents</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="searx.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/searx.sh</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="searx.sh.html#install">Install</a></li>
<li class="toctree-l2"><a class="reference internal" href="searx.sh.html#overview">Overview</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="filtron.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/filtron.sh</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="filtron.sh.html#create-user">Create user</a></li>
<li class="toctree-l2"><a class="reference internal" href="filtron.sh.html#install-go">Install go</a></li>
<li class="toctree-l2"><a class="reference internal" href="filtron.sh.html#install-filtron">Install filtron</a></li>
<li class="toctree-l2"><a class="reference internal" href="filtron.sh.html#overview">Overview</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="morty.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/morty.sh</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="morty.sh.html#create-user">Create user</a></li>
<li class="toctree-l2"><a class="reference internal" href="morty.sh.html#install-go">Install go</a></li>
<li class="toctree-l2"><a class="reference internal" href="morty.sh.html#install-morty">Install morty</a></li>
<li class="toctree-l2"><a class="reference internal" href="morty.sh.html#overview">Overview</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="lxc.sh.html"><code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span></code></a><ul>
<li class="toctree-l2"><a class="reference internal" href="lxc.sh.html#install-suite">Install suite</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxc.sh.html#running-commands">Running commands</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxc.sh.html#setup-searx-buildhost">Setup searx buildhost</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxc.sh.html#overview">Overview</a></li>
<li class="toctree-l2"><a class="reference internal" href="lxc.sh.html#searx-suite">searx suite</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="common-commands-environment">
<span id="toolboxing-common"></span><h2>Common commands &amp; environment<a class="headerlink" href="#common-commands-environment" title="Permalink to this headline"></a></h2>
<p>Scripts to maintain services often dispose of common commands and environments.</p>
<dl>
<dt><code class="docutils literal notranslate"><span class="pre">shell</span></code><span class="classifier">command</span></dt><dd><p>Opens a shell from the service user <code class="docutils literal notranslate"><span class="pre">${SERVICE_USSR}</span></code>, very helpful for
troubleshooting.</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">inspect</span> <span class="pre">service</span></code><span class="classifier">command</span></dt><dd><p>Shows status and log of the service, most often you have a option to enable
more verbose debug logs. Very helpful for debugging, but be careful not to
enable debugging in a production environment!</p>
</dd>
<dt><code class="docutils literal notranslate"><span class="pre">FORCE_TIMEOUT</span></code><span class="classifier">environment</span></dt><dd><p>Sets timeout for interactive prompts. If you want to run a script in batch
job, with defaults choices, set <code class="docutils literal notranslate"><span class="pre">FORCE_TIMEOUT=0</span></code>. By example; to install a
reverse proxy for filtron on all containers of the <a class="reference internal" href="lxc.sh.html#lxc-searx-env"><span class="std std-ref">searx suite</span></a> use</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/filtron.sh apache install
</pre></div>
</div>
</dd>
</dl>
</div>
<div class="section" id="tooling-box-setup">
<span id="toolboxing-setup"></span><h2>Tooling box setup<a class="headerlink" href="#tooling-box-setup" title="Permalink to this headline"></a></h2>
<p>The main setup is done in the <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/.config.sh">git://.config.sh</a> (read also <a class="reference internal" href="../dev/makefile.html#makefile-setup"><span class="std std-ref">Makefile setup</span></a>).</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># -*- coding: utf-8; mode: sh -*-</span>
<span class="c1"># SPDX-License-Identifier: AGPL-3.0-or-later</span>
<span class="c1"># shellcheck shell=bash disable=SC2034</span>
<span class="c1">#</span>
<span class="c1"># This environment is used by ./utils scripts like filtron.sh or searx.sh. The</span>
<span class="c1"># default values are *most flexible* and *best maintained*, you normally not</span>
<span class="c1"># need to change the defaults (except PUBLIC_URL).</span>
<span class="c1">#</span>
<span class="c1"># Before you change any value here you have to uninstall any previous</span>
<span class="c1"># installation. Further is it recommended to backup your changes simply by</span>
<span class="c1"># adding them to you local brand (git branch)::</span>
<span class="c1">#</span>
<span class="c1"># git add .config</span>
<span class="c1"># The public URL of the searx instance: PUBLIC_URL=&quot;https://mydomain.xy/searx&quot;</span>
<span class="c1"># The default is taken from ./utils/brand.env.</span>
<span class="nv">PUBLIC_URL</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">SEARX_URL</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="k">if</span> <span class="o">[[</span> <span class="si">${</span><span class="nv">PUBLIC_URL</span><span class="si">}</span> <span class="o">==</span> <span class="s2">&quot;https://searx.me&quot;</span> <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
<span class="c1"># hint: Linux containers do not have DNS entries, lets use IPs</span>
<span class="nv">PUBLIC_URL</span><span class="o">=</span><span class="s2">&quot;http://</span><span class="k">$(</span>primary_ip<span class="k">)</span><span class="s2">/searx&quot;</span>
<span class="k">fi</span>
<span class="c1"># searx.sh</span>
<span class="c1"># ---------</span>
<span class="c1"># SEARX_INTERNAL_URL=&quot;127.0.0.1:8888&quot;</span>
<span class="c1"># Only change, if you maintain a searx brand in your searx fork.</span>
<span class="c1"># GIT_BRANCH=&quot;${GIT_BRANCH:-master}&quot;</span>
<span class="c1"># filtron.sh</span>
<span class="c1"># ----------</span>
<span class="c1"># FILTRON_API=&quot;127.0.0.1:4005&quot;</span>
<span class="c1"># FILTRON_LISTEN=&quot;127.0.0.1:4004&quot;</span>
<span class="c1"># FILTRON_TARGET=&quot;127.0.0.1:8888&quot;</span>
<span class="c1"># morty.sh</span>
<span class="c1"># --------</span>
<span class="c1"># morty listen address</span>
<span class="c1"># MORTY_LISTEN=&quot;127.0.0.1:3000&quot;</span>
<span class="c1"># PUBLIC_URL_PATH_MORTY=&quot;/morty/&quot;</span>
<span class="c1"># system services</span>
<span class="c1"># ---------------</span>
<span class="c1"># Common $HOME folder of the service accounts</span>
<span class="c1"># SERVICE_HOME_BASE=&quot;/usr/local&quot;</span>
<span class="c1"># **experimental**: Set SERVICE_USER to run all services by one account, but be</span>
<span class="c1"># aware that removing discrete components might conflict!</span>
<span class="c1"># SERVICE_USER=searx</span>
</pre></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://searx.space/">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li>Previous: <a href="../dev/reST.html" title="previous chapter">reST primer</a>
<li>Next: <a href="searx.sh.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">utils/searx.sh</span></code></a>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

364
utils/lxc.sh.html Normal file
View File

@ -0,0 +1,364 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>utils/lxc.sh &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Blog" href="../blog/index.html" />
<link rel="prev" title="utils/morty.sh" href="morty.sh.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../blog/index.html" title="Blog"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="morty.sh.html" title="utils/morty.sh"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="utils-lxc-sh">
<span id="lxc-sh"></span><h1><code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span></code><a class="headerlink" href="#utils-lxc-sh" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">further reading</p>
<ul class="simple">
<li><p><a class="reference external" href="https://snapcraft.io">snap</a>, <a class="reference external" href="https://snapcraft.io/lxd">snapcraft LXD</a></p></li>
<li><p><a class="reference external" href="https://linuxcontainers.org/lxc/introduction/">LXC</a>, <a class="reference external" href="https://linuxcontainers.org/lxd/introduction/">LXD</a></p></li>
<li><p><a class="reference external" href="https://uk.images.linuxcontainers.org/">LXC/LXD Image Server</a></p></li>
<li><p><a class="reference external" href="https://github.com/lxc/lxd">LXD&#64;github</a></p></li>
</ul>
</div>
<p>With the use of <em>Linux Containers</em> (<a class="reference external" href="https://linuxcontainers.org/lxc/introduction/">LXC</a>) we can scale our tasks over a stack of
containers, what we call the: <em>lxc suite</em>. The <em>searx suite</em>
(<a class="reference external" href="https://github.com/asciimoo/searx/blob/master/utils/lxc-searx.env">lxc-searx.env</a>) is loaded by default, every time
you start the <code class="docutils literal notranslate"><span class="pre">lxc.sh</span></code> script (<em>you do not need to care about</em>).</p>
<p>Before you can start with containers, you need to install and initiate <a class="reference external" href="https://linuxcontainers.org/lxd/introduction/">LXD</a>
once:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ snap install lxd
$ lxd init --auto
</pre></div>
</div>
<p>To make use of the containers from the <em>searx suite</em>, you have to build the
<a class="reference internal" href="#lxc-sh-help"><span class="std std-ref">LXC suite containers</span></a> initial. But be warned, <strong>this might
take some time</strong>:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/lxc.sh build
</pre></div>
</div>
<p>A cup of coffee later, your LXC suite is build up and you can run whatever task
you want / in a selected or even in all <a class="reference internal" href="#lxc-sh-help"><span class="std std-ref">LXC suite containers</span></a>. If you do not want to build all containers, <strong>you can build just
one</strong>:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/lxc.sh build searx-ubu1804
</pre></div>
</div>
<p><em>Good to know …</em></p>
<p>Eeach container shares the root folder of the repository and the
command <code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span> <span class="pre">cmd</span></code> <strong>handles relative path names transparent</strong>,
compare output of:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/lxc.sh cmd -- ls -la Makefile
...
</pre></div>
</div>
<p>In the containers, you can run what ever you want, e.g. to start a bash use:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/lxc.sh cmd searx-ubu1804 bash
INFO: [searx-ubu1804] bash
root@searx-ubu1804:/share/searx#
</pre></div>
</div>
<p>If there comes the time you want to <strong>get rid off all</strong> the containers and
<strong>clean up local images</strong> just type:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/lxc.sh remove
$ sudo -H ./utils/lxc.sh remove images
</pre></div>
</div>
<div class="section" id="install-suite">
<h2>Install suite<a class="headerlink" href="#install-suite" title="Permalink to this headline"></a></h2>
<p>To install the complete <a class="reference internal" href="#lxc-searx-env"><span class="std std-ref">searx suite (includes searx, morty &amp; filtron)</span></a> into all <a class="reference external" href="https://linuxcontainers.org/lxc/introduction/">LXC</a> use:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ sudo -H ./utils/lxc.sh install suite
</pre></div>
</div>
<p>The command above installs a searx suite (see <a class="reference internal" href="../admin/installation.html#installation-scripts"><span class="std std-ref">Installation scripts</span></a>). To
get the IP (URL) of the filtron service in the containers use <code class="docutils literal notranslate"><span class="pre">show</span> <span class="pre">suite</span></code>
command. To test instances from containers just open the URLs in your
WEB-Browser:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ sudo ./utils/lxc.sh show suite | grep filtron
[searx-ubu1604] INFO: (eth0) filtron: http://n.n.n.246:4004/ http://n.n.n.246/searx
[searx-ubu1804] INFO: (eth0) filtron: http://n.n.n.147:4004/ http://n.n.n.147/searx
[searx-ubu1910] INFO: (eth0) filtron: http://n.n.n.140:4004/ http://n.n.n.140/searx
[searx-ubu2004] INFO: (eth0) filtron: http://n.n.n.18:4004/ http://n.n.n.18/searx
[searx-fedora31] INFO: (eth0) filtron: http://n.n.n.46:4004/ http://n.n.n.46/searx
[searx-archlinux] INFO: (eth0) filtron: http://n.n.n.32:4004/ http://n.n.n.32/searx
</pre></div>
</div>
<p>To <a class="reference internal" href="../admin/installation-nginx.html#installation-nginx"><span class="std std-ref">install a nginx</span></a> reverse proxy for filtron and
morty use (or alternatively use <a class="reference internal" href="../admin/installation-apache.html#installation-apache"><span class="std std-ref">apache</span></a>):</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/filtron.sh nginx install
sudo -H ./utils/lxc.sh cmd -- FORCE_TIMEOUT=0 ./utils/morty.sh nginx install
</pre></div>
</div>
</div>
<div class="section" id="running-commands">
<h2>Running commands<a class="headerlink" href="#running-commands" title="Permalink to this headline"></a></h2>
<p><strong>Inside containers, you can use make or run scripts</strong> from the
<a class="reference internal" href="index.html#toolboxing"><span class="std std-ref">Tooling box utils/*</span></a>. By example: to setup a <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a> and run the
Makefile target <code class="docutils literal notranslate"><span class="pre">test</span></code> in the <a class="reference external" href="https://www.archlinux.org/">archlinux</a> container:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/lxc.sh cmd searx-archlinux ./utils/searx.sh install buildhost
sudo -H ./utils/lxc.sh cmd searx-archlinux make test
</pre></div>
</div>
</div>
<div class="section" id="setup-searx-buildhost">
<h2>Setup searx buildhost<a class="headerlink" href="#setup-searx-buildhost" title="Permalink to this headline"></a></h2>
<p>You can <strong>install the searx buildhost environment</strong> into one or all containers.
The installation procedure to set up a <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">build host</span></a> takes its
time. Installation in all containers will take more time (time for another cup
of coffee).:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/lxc.sh cmd -- ./utils/searx.sh install buildhost
</pre></div>
</div>
<p>To build (live) documentation inside a <a class="reference external" href="https://www.archlinux.org/">archlinux</a> container:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/lxc.sh cmd searx-archlinux make docs-clean docs-live
...
[I 200331 15:00:42 server:296] Serving on http://0.0.0.0:8080
</pre></div>
</div>
<p>To get IP of the container and the port number <em>live docs</em> is listening:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>$ sudo ./utils/lxc.sh show suite | grep docs-live
...
[searx-archlinux] INFO: (eth0) docs-live: http://n.n.n.12:8080/
</pre></div>
</div>
</div>
<div class="section" id="overview">
<span id="lxc-sh-help"></span><h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">--help</span></code> output of the script is largely self-explanatory:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>usage::
lxc.sh build [containers|&lt;name&gt;]
lxc.sh copy [images]
lxc.sh remove [containers|&lt;name&gt;|images]
lxc.sh [start|stop] [containers|&lt;name&gt;]
lxc.sh show [images|suite|info|config [&lt;name&gt;]]
lxc.sh cmd [--|&lt;name&gt;] &#39;...&#39;
lxc.sh install [suite|base [&lt;name&gt;]]
build
:containers: build, launch all containers and &#39;install base&#39; packages
:&lt;name&gt;: build, launch container &lt;name&gt; and &#39;install base&#39; packages
copy:
:images: copy remote images of the suite into local storage
remove
:containers: delete all &#39;containers&#39; or only &lt;container-name&gt;
:images: delete local images of the suite
start/stop
:containers: start/stop all &#39;containers&#39; from the suite
:&lt;name&gt;: start/stop container &lt;name&gt; from suite
show
:info: show info of all (or &lt;name&gt;) containers from LXC suite
:config: show config of all (or &lt;name&gt;) containers from the LXC suite
:suite: show services of all (or &lt;name&gt;) containers from the LXC suite
:images: show information of local images
cmd
use single qoutes to evaluate in container&#39;s bash, e.g.: &#39;echo $(hostname)&#39;
-- run command &#39;...&#39; in all containers of the LXC suite
:&lt;name&gt;: run command &#39;...&#39; in container &lt;name&gt;
install
:base: prepare LXC; install basic packages
:suite: install LXC searx suite into all (or &lt;name&gt;) containers
LXC suite: searx --&gt; http://192.168.1.127/searx
suite includes searx, morty &amp; filtron
suite images:
ubu1604 ubu1804 ubu1910 ubu2004 fedora31 archlinux
suite containers:
searx-ubu1604 searx-ubu1804 searx-ubu1910 searx-ubu2004 searx-fedora31
searx-archlinux
</pre></div>
</div>
</div>
<div class="section" id="searx-suite">
<span id="lxc-searx-env"></span><h2>searx suite<a class="headerlink" href="#searx-suite" title="Permalink to this headline"></a></h2>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># -*- coding: utf-8; mode: sh indent-tabs-mode: nil -*-</span>
<span class="c1"># SPDX-License-Identifier: AGPL-3.0-or-later</span>
<span class="c1"># shellcheck shell=bash</span>
<span class="c1"># This file is a setup of a LXC suite. It is sourced from different context, do</span>
<span class="c1"># not manipulate the environment directly, implement functions and manipulate</span>
<span class="c1"># environment only is subshells!</span>
<span class="c1"># ----------------------------------------------------------------------------</span>
<span class="c1"># config</span>
<span class="c1"># ----------------------------------------------------------------------------</span>
<span class="c1"># shellcheck disable=SC2034</span>
<span class="nv">LXC_SUITE_NAME</span><span class="o">=</span><span class="s2">&quot;searx&quot;</span>
lxc_set_suite_env<span class="o">()</span> <span class="o">{</span>
<span class="c1"># name of https://images.linuxcontainers.org</span>
<span class="nb">export</span> <span class="nv">LINUXCONTAINERS_ORG_NAME</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">LINUXCONTAINERS_ORG_NAME</span><span class="k">:-</span><span class="nv">images</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="nb">export</span> <span class="nv">LXC_HOST_PREFIX</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">LXC_SUITE_NAME</span><span class="k">:-</span><span class="nv">searx</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="nb">export</span> <span class="nv">LXC_SUITE</span><span class="o">=(</span>
<span class="c1"># to disable containers, comment out lines ..</span>
<span class="c1"># end of standard support see https://wiki.ubuntu.com/Releases</span>
<span class="s2">&quot;</span><span class="nv">$LINUXCONTAINERS_ORG_NAME</span><span class="s2">:ubuntu/16.04&quot;</span> <span class="s2">&quot;ubu1604&quot;</span> <span class="c1"># April 2021</span>
<span class="s2">&quot;</span><span class="nv">$LINUXCONTAINERS_ORG_NAME</span><span class="s2">:ubuntu/18.04&quot;</span> <span class="s2">&quot;ubu1804&quot;</span> <span class="c1"># April 2023</span>
<span class="s2">&quot;</span><span class="nv">$LINUXCONTAINERS_ORG_NAME</span><span class="s2">:ubuntu/19.10&quot;</span> <span class="s2">&quot;ubu1910&quot;</span> <span class="c1"># July 2020</span>
<span class="s2">&quot;</span><span class="nv">$LINUXCONTAINERS_ORG_NAME</span><span class="s2">:ubuntu/20.04&quot;</span> <span class="s2">&quot;ubu2004&quot;</span> <span class="c1"># future (EOL 2030)</span>
<span class="c1"># EOL see https://fedoraproject.org/wiki/Releases</span>
<span class="s2">&quot;</span><span class="nv">$LINUXCONTAINERS_ORG_NAME</span><span class="s2">:fedora/31&quot;</span> <span class="s2">&quot;fedora31&quot;</span>
<span class="c1"># rolling releases see https://www.archlinux.org/releng/releases/</span>
<span class="s2">&quot;</span><span class="nv">$LINUXCONTAINERS_ORG_NAME</span><span class="s2">:archlinux&quot;</span> <span class="s2">&quot;archlinux&quot;</span>
<span class="o">)</span>
<span class="nv">PUBLIC_URL</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">PUBLIC_URL</span><span class="k">:-</span><span class="nv">http</span><span class="p">://</span><span class="k">$(</span>uname -n<span class="k">)</span><span class="p">/searx</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="k">if</span> in_container<span class="p">;</span> <span class="k">then</span>
<span class="c1"># container hostnames do not have a DNS entry: use primary IP!</span>
<span class="nv">PUBLIC_URL</span><span class="o">=</span><span class="s2">&quot;http://</span><span class="k">$(</span>primary_ip<span class="k">)</span><span class="s2">/searx&quot;</span>
<span class="c1"># make GUEST&#39;s services public to the HOST</span>
<span class="nv">FILTRON_API</span><span class="o">=</span><span class="s2">&quot;0.0.0.0:4005&quot;</span>
<span class="nv">FILTRON_LISTEN</span><span class="o">=</span><span class="s2">&quot;0.0.0.0:4004&quot;</span>
<span class="nv">MORTY_LISTEN</span><span class="o">=</span><span class="s2">&quot;0.0.0.0:3000&quot;</span>
<span class="c1"># export LXC specific environment</span>
<span class="nb">export</span> PUBLIC_URL FILTRON_API FILTRON_LISTEN MORTY_LISTEN
<span class="k">fi</span>
<span class="o">}</span>
lxc_suite_install_info<span class="o">()</span> <span class="o">{</span>
<span class="o">(</span>
lxc_set_suite_env
cat <span class="s">&lt;&lt;EOF</span>
<span class="s">LXC suite: ${LXC_SUITE_NAME} --&gt; ${PUBLIC_URL}</span>
<span class="s"> suite includes searx, morty &amp; filtron</span>
<span class="s">suite images:</span>
<span class="s">$(echo &quot; ${LOCAL_IMAGES[*]}&quot; | $FMT)</span>
<span class="s">suite containers:</span>
<span class="s">$(echo &quot; ${CONTAINERS[*]}&quot; | $FMT)</span>
<span class="s">EOF</span>
<span class="o">)</span>
<span class="o">}</span>
lxc_suite_install<span class="o">()</span> <span class="o">{</span>
<span class="o">(</span>
lxc_set_suite_env
<span class="nv">FORCE_TIMEOUT</span><span class="o">=</span>0
<span class="nb">export</span> FORCE_TIMEOUT
<span class="s2">&quot;</span><span class="si">${</span><span class="nv">LXC_REPO_ROOT</span><span class="si">}</span><span class="s2">/utils/searx.sh&quot;</span> install all
<span class="s2">&quot;</span><span class="si">${</span><span class="nv">LXC_REPO_ROOT</span><span class="si">}</span><span class="s2">/utils/morty.sh&quot;</span> install all
<span class="s2">&quot;</span><span class="si">${</span><span class="nv">LXC_REPO_ROOT</span><span class="si">}</span><span class="s2">/utils/filtron.sh&quot;</span> install all
rst_title <span class="s2">&quot;suite installation finished (</span><span class="k">$(</span>hostname<span class="k">)</span><span class="s2">)&quot;</span> part
lxc_suite_info
<span class="nb">echo</span>
<span class="o">)</span>
<span class="o">}</span>
lxc_suite_info<span class="o">()</span> <span class="o">{</span>
<span class="o">(</span>
lxc_set_suite_env
<span class="k">for</span> ip in <span class="k">$(</span>global_IPs<span class="k">)</span> <span class="p">;</span> <span class="k">do</span>
<span class="k">if</span> <span class="o">[[</span> <span class="nv">$ip</span> <span class="o">=</span>~ .*:.* <span class="o">]]</span><span class="p">;</span> <span class="k">then</span>
info_msg <span class="s2">&quot;(</span><span class="si">${</span><span class="nv">ip</span><span class="p">%|*</span><span class="si">}</span><span class="s2">) IPv6: http://[</span><span class="si">${</span><span class="nv">ip</span><span class="p">#*|</span><span class="si">}</span><span class="s2">]&quot;</span>
<span class="k">else</span>
<span class="c1"># IPv4:</span>
<span class="c1"># shellcheck disable=SC2034,SC2031</span>
info_msg <span class="s2">&quot;(</span><span class="si">${</span><span class="nv">ip</span><span class="p">%|*</span><span class="si">}</span><span class="s2">) filtron: http://</span><span class="si">${</span><span class="nv">ip</span><span class="p">#*|</span><span class="si">}</span><span class="s2">:4004/ </span><span class="nv">$PUBLIC_URL</span><span class="s2">&quot;</span>
info_msg <span class="s2">&quot;(</span><span class="si">${</span><span class="nv">ip</span><span class="p">%|*</span><span class="si">}</span><span class="s2">) morty: http://</span><span class="si">${</span><span class="nv">ip</span><span class="p">#*|</span><span class="si">}</span><span class="s2">:3000/ </span><span class="nv">$PUBLIC_URL_MORTY</span><span class="s2">&quot;</span>
info_msg <span class="s2">&quot;(</span><span class="si">${</span><span class="nv">ip</span><span class="p">%|*</span><span class="si">}</span><span class="s2">) docs-live: http://</span><span class="si">${</span><span class="nv">ip</span><span class="p">#*|</span><span class="si">}</span><span class="s2">:8080/&quot;</span>
<span class="k">fi</span>
<span class="k">done</span>
<span class="o">)</span>
<span class="o">}</span>
</pre></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://searx.space/">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a>
<ul>
<li>Previous: <a href="morty.sh.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">utils/morty.sh</span></code></a>
<li>Next: <a href="../blog/index.html" title="next chapter">Blog</a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

308
utils/morty.sh.html Normal file
View File

@ -0,0 +1,308 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>utils/morty.sh &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/segment.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/menu.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.css" />
<link rel="stylesheet" type="text/css" href="../_static/sphinx_tabs/tabs.css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script src="../_static/sphinx_tabs/semantic-ui-2.4.1/tab.min.js"></script>
<script src="../_static/sphinx_tabs/tabs.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="utils/lxc.sh" href="lxc.sh.html" />
<link rel="prev" title="utils/filtron.sh" href="filtron.sh.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="lxc.sh.html" title="utils/lxc.sh"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="filtron.sh.html" title="utils/filtron.sh"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">utils/morty.sh</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="utils-morty-sh">
<span id="morty-sh"></span><h1><code class="docutils literal notranslate"><span class="pre">utils/morty.sh</span></code><a class="headerlink" href="#utils-morty-sh" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">further reading</p>
<ul class="simple">
<li><p><a class="reference internal" href="../admin/architecture.html#architecture"><span class="std std-ref">Architecture</span></a></p></li>
<li><p><a class="reference internal" href="../admin/installation.html#installation"><span class="std std-ref">Installation</span></a> (<a class="reference internal" href="../admin/installation-nginx.html#installation-nginx"><span class="std std-ref">nginx</span></a> &amp; <a class="reference internal" href="../admin/installation-apache.html#installation-apache"><span class="std std-ref">apache</span></a>)</p></li>
<li><p><a class="reference internal" href="../admin/morty.html#searx-morty"><span class="std std-ref">How to setup result proxy</span></a></p></li>
</ul>
</div>
<p>To simplify installation and maintenance of a <a class="reference external" href="https://github.com/asciimoo/morty">morty</a> instance you can use the
script <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/utils/morty.sh">git://utils/morty.sh</a>. In most cases you will install <a class="reference external" href="https://github.com/asciimoo/morty">morty</a> simply by
running the command:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/morty.sh install all
</pre></div>
</div>
<p>The script adds a <code class="docutils literal notranslate"><span class="pre">${SERVICE_USER}</span></code> (default:<code class="docutils literal notranslate"><span class="pre">morty</span></code>) and installs <a class="reference external" href="https://github.com/asciimoo/morty">morty</a>
into this user account:</p>
<ol class="arabic simple">
<li><p>Create a separated user account (<code class="docutils literal notranslate"><span class="pre">morty</span></code>).</p></li>
<li><p>Download and install <a class="reference external" href="https://golang.org/">Go</a> binary in users $HOME (<code class="docutils literal notranslate"><span class="pre">~morty</span></code>).</p></li>
<li><p>Install <a class="reference external" href="https://github.com/asciimoo/morty">morty</a> with the package management from <a class="reference external" href="https://golang.org/">Go</a> (<code class="docutils literal notranslate"><span class="pre">go</span> <span class="pre">get</span> <span class="pre">-v</span> <span class="pre">-u</span>
<span class="pre">github.com/asciimoo/morty</span></code>)</p></li>
<li><p>Setup a systemd service unit <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/utils/templates/lib/systemd/system/morty.service">[ref]</a>
(<code class="docutils literal notranslate"><span class="pre">/lib/systemd/system/morty.service</span></code>).</p></li>
</ol>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>To add morty to your searx instance read chapter <a class="reference internal" href="../admin/morty.html#searx-morty"><span class="std std-ref">How to setup result proxy</span></a>.</p>
</div>
<div class="section" id="create-user">
<h2>Create user<a class="headerlink" href="#create-user" title="Permalink to this headline"></a></h2>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
<div class="docutils container">
<p>bash</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo -H useradd --shell /bin/bash --system <span class="se">\</span>
--home-dir /usr/local/morty <span class="se">\</span>
--comment Privacy-respecting metasearch engine morty
$ sudo -H mkdir /usr/local/morty
$ sudo -H chown -R morty:morty /usr/local/morty
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="install-go">
<h2>Install go<a class="headerlink" href="#install-go" title="Permalink to this headline"></a></h2>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
<div class="docutils container">
<p>bash</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ cat &gt; /usr/local/morty/.go_env <span class="s">&lt;&lt;EOF</span>
<span class="s">export GOPATH=/usr/local/morty/go-apps</span>
<span class="s">export PATH=$PATH:/usr/local/morty/local/go/bin:$GOPATH/bin</span>
<span class="s">EOF</span>
$ sudo -i -u morty
<span class="o">(</span>morty<span class="o">)</span> $ <span class="nb">echo</span> <span class="s1">&#39;source /usr/local/morty/.go_env&#39;</span> &gt;&gt; ~/.profile
<span class="o">(</span>morty<span class="o">)</span> $ mkdir /usr/local/morty/local
<span class="o">(</span>morty<span class="o">)</span> $ wget --progress<span class="o">=</span>bar -O go1.13.5.linux-amd64.tar.gz <span class="se">\</span>
https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz
<span class="o">(</span>morty<span class="o">)</span> $ tar -C /usr/local/morty/local/go -xzf go1.13.5.linux-amd64.tar.gz
<span class="o">(</span>morty<span class="o">)</span> $ which go
/usr/local/morty/local/go/bin/go
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="install-morty">
<h2>Install morty<a class="headerlink" href="#install-morty" title="Permalink to this headline"></a></h2>
<p>Install morty software and systemd unit:</p>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-YmFzaA== docutils container">
<div class="docutils container">
<p>bash</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-YmFzaA== active docutils container">
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo -i -u morty
<span class="o">(</span>morty<span class="o">)</span> $ go get -v -u github.com/asciimoo/morty
</pre></div>
</div>
</div>
</div>
<div class="sphinx-tabs docutils container">
<div class="ui top attached tabular menu sphinx-menu docutils container">
<div class="active item sphinx-data-tab-c3lzdGVtZA== docutils container">
<div class="docutils container">
<p>systemd</p>
</div>
</div>
</div>
<div class="ui bottom attached sphinx-tab tab segment sphinx-data-tab-c3lzdGVtZA== active docutils container">
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="o">[</span>Unit<span class="o">]</span>
<span class="nv">Description</span><span class="o">=</span>morty
<span class="nv">After</span><span class="o">=</span>syslog.target
<span class="nv">After</span><span class="o">=</span>network.target
<span class="o">[</span>Service<span class="o">]</span>
<span class="nv">Type</span><span class="o">=</span>simple
<span class="nv">User</span><span class="o">=</span>morty
<span class="nv">Group</span><span class="o">=</span>morty
<span class="nv">WorkingDirectory</span><span class="o">=</span>/usr/local/morty
<span class="nv">ExecStart</span><span class="o">=</span>/usr/local/morty/go-apps/bin/morty -key <span class="s1">&#39;&#39;</span> -listen <span class="s1">&#39;127.0.0.1:3000&#39;</span> -timeout 5
<span class="nv">Restart</span><span class="o">=</span>always
<span class="nv">Environment</span><span class="o">=</span><span class="nv">USER</span><span class="o">=</span>morty <span class="nv">HOME</span><span class="o">=</span>/usr/local/morty <span class="nv">DEBUG</span><span class="o">=</span><span class="nb">false</span>
<span class="c1"># Some distributions may not support these hardening directives. If you cannot</span>
<span class="c1"># start the service due to an unknown option, comment out the ones not supported</span>
<span class="c1"># by your version of systemd.</span>
<span class="nv">ProtectSystem</span><span class="o">=</span>full
<span class="nv">PrivateDevices</span><span class="o">=</span>yes
<span class="nv">PrivateTmp</span><span class="o">=</span>yes
<span class="nv">NoNewPrivileges</span><span class="o">=</span><span class="nb">true</span>
<span class="o">[</span>Install<span class="o">]</span>
<span class="nv">WantedBy</span><span class="o">=</span>multi-user.target
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="overview">
<span id="morty-sh-overview"></span><h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">--help</span></code> output of the script is largely self-explanatory
(<a class="reference internal" href="index.html#toolboxing-common"><span class="std std-ref">Common commands &amp; environment</span></a>):</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>usage::
morty.sh shell
morty.sh install [all|user]
morty.sh update [morty]
morty.sh remove [all]
morty.sh activate [service]
morty.sh deactivate [service]
morty.sh inspect [service]
morty.sh option [debug-on|debug-off|new-key]
morty.sh apache [install|remove]
morty.sh nginx [install|remove]
morty.sh info [searx]
shell
start interactive shell from user morty
install / remove
all: complete setup of morty service
user: add/remove service user &#39;morty&#39; (/usr/local/morty)
update morty
Update morty installation (/usr/local/morty)
activate service
activate and start service daemon (systemd unit)
deactivate service
stop and deactivate service daemon (systemd unit)
inspect service
show service status and log
option
set one of the available options
:new-key: set new morty key
apache : http://192.168.1.127/morty/
:install: apache site with a reverse proxy (ProxyPass)
:remove: apache site morty.conf
nginx (http://192.168.1.127/morty/)
:install: nginx site with a reverse proxy (ProxyPass)
:remove: nginx site morty.conf
If needed, set the environment variables in the &#39;.config.sh&#39; file::
PUBLIC_URL_MORTY: http://192.168.1.127/morty/
MORTY_LISTEN: 127.0.0.1:3000
SERVICE_USER: morty
To activate result and image proxy in searx, edit settings.yml (read:
https://asciimoo.github.io/searx/admin/morty.html)::
result_proxy:
url : http://192.168.1.127/morty/
server:
image_proxy : True
</pre></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://searx.space/">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a>
<ul>
<li>Previous: <a href="filtron.sh.html" title="previous chapter"><code class="docutils literal notranslate"><span class="pre">utils/filtron.sh</span></code></a>
<li>Next: <a href="lxc.sh.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">utils/lxc.sh</span></code></a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>

180
utils/searx.sh.html Normal file
View File

@ -0,0 +1,180 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>utils/searx.sh &#8212; Searx Documentation (Searx-0.16.0.tex)</title>
<link rel="stylesheet" href="../_static/searx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="utils/filtron.sh" href="filtron.sh.html" />
<link rel="prev" title="Tooling box utils/*" href="index.html" />
<script>DOCUMENTATION_OPTIONS.URL_ROOT = '../';</script>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="filtron.sh.html" title="utils/filtron.sh"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="Tooling box utils/*"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-0.16.0.tex)</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a> &#187;</li>
<li class="nav-item nav-item-this"><a href=""><code class="docutils literal notranslate"><span class="pre">utils/searx.sh</span></code></a></li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="utils-searx-sh">
<span id="searx-sh"></span><h1><code class="docutils literal notranslate"><span class="pre">utils/searx.sh</span></code><a class="headerlink" href="#utils-searx-sh" title="Permalink to this headline"></a></h1>
<div class="sidebar">
<p class="sidebar-title">further reading</p>
<ul class="simple">
<li><p><a class="reference internal" href="../admin/architecture.html#architecture"><span class="std std-ref">Architecture</span></a></p></li>
<li><p><a class="reference internal" href="../admin/installation.html#installation"><span class="std std-ref">Installation</span></a></p></li>
<li><p><a class="reference internal" href="../admin/installation-nginx.html#installation-nginx"><span class="std std-ref">Install with nginx</span></a></p></li>
<li><p><a class="reference internal" href="../admin/installation-apache.html#installation-apache"><span class="std std-ref">Install with apache</span></a></p></li>
</ul>
</div>
<p>To simplify installation and maintenance of a searx instance you can use the
script <a class="reference external" href="https://github.com/asciimoo/searx/blob/master/utils/searx.sh">git://utils/searx.sh</a>.</p>
<div class="section" id="install">
<h2>Install<a class="headerlink" href="#install" title="Permalink to this headline"></a></h2>
<p>In most cases you will install searx simply by running the command:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo -H ./utils/searx.sh install all
</pre></div>
</div>
<p>The script adds a <code class="docutils literal notranslate"><span class="pre">${SERVICE_USER}</span></code> (default:<code class="docutils literal notranslate"><span class="pre">searx</span></code>) and installs searx
into this user account. The installation is described in chapter
<a class="reference internal" href="../admin/installation-searx.html#installation-basic"><span class="std std-ref">Step by step installation</span></a>.</p>
</div>
<div class="section" id="overview">
<span id="intranet-reverse-proxy"></span><h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">--help</span></code> output of the script is largely self-explanatory
(<a class="reference internal" href="index.html#toolboxing-common"><span class="std std-ref">Common commands &amp; environment</span></a>):</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>usage::
searx.sh shell
searx.sh install [all|user|searx-src|pyenv|uwsgi|packages|buildhost]
searx.sh update [searx]
searx.sh remove [all|user|pyenv|searx-src]
searx.sh activate [service]
searx.sh deactivate [service]
searx.sh inspect [service]
searx.sh option [debug-[on|off]|image-proxy-[on|off]|result-proxy &lt;url&gt; &lt;key&gt;]
searx.sh apache [install|remove]
shell
start interactive shell from user searx
install / remove
:all: complete (de-) installation of searx service
:user: add/remove service user &#39;searx&#39; (/usr/local/searx)
:searx-src: clone https://github.com/asciimoo/searx
:pyenv: create/remove virtualenv (python) in /usr/local/searx/searx-pyenv
:uwsgi: install searx uWSGI application
:settings: reinstall settings from /800GBPCIex4/share/test123/asciimoo-searx/searx/settings.yml
:packages: install needed packages from OS package manager
:buildhost: install packages from OS package manager needed by buildhosts
update searx
Update searx installation (/usr/local/searx)
activate service
activate and start service daemon (systemd unit)
deactivate service
stop and deactivate service daemon (systemd unit)
inspect service
run some small tests and inspect service&#39;s status and log
option
set one of the available options
apache
:install: apache site with the searx uwsgi app
:remove: apache site
searx settings: /etc/searx/settings.yml
If needed, set PUBLIC_URL of your WEB service in the &#39;.config.sh&#39; file::
PUBLIC_URL : http://192.168.1.127/searx
SEARX_INSTANCE_NAME : searx@192.168.1.127
SERVICE_USER : searx
SEARX_INTERNAL_HTTP : http://127.0.0.1:8888
</pre></div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<span id="sidebar-top"></span>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
</a></p>
<h3>Project Links</h3>
<ul>
<li><a href="https://github.com/asciimoo/searx">Source</a>
<li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a>
<li><a href="https://searx.space/">Public instances</a>
<li><a href="https://twitter.com/Searx_engine">Twitter</a>
</ul><h3>Navigation</h3>
<ul>
<li><a href="../index.html">Overview</a>
<ul>
<li><a href="index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a>
<ul>
<li>Previous: <a href="index.html" title="previous chapter">Tooling box <code class="docutils literal notranslate"><span class="pre">utils/*</span></code></a>
<li>Next: <a href="filtron.sh.html" title="next chapter"><code class="docutils literal notranslate"><span class="pre">utils/filtron.sh</span></code></a></ul>
</li>
</ul>
</li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2015-2020, Adam Tauber, Noémi Ványi.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.1.1.
</div>
<script src="../_static/version_warning_offset.js"></script>
</body>
</html>