mirror of
https://github.com/searx/searx
synced 2024-11-19 16:37:18 +01:00
update install docs on reverse proxy
This commit is contained in:
parent
bac7dc57ee
commit
356efb967f
@ -171,6 +171,8 @@ Add this configuration in the server config file
|
||||
location = /searx { rewrite ^ /searx/; }
|
||||
location /searx {
|
||||
try_files $uri @searx;
|
||||
proxy_pass http://localhost:9999/;
|
||||
proxy_set_header X-Script-Name /searx;
|
||||
}
|
||||
location @searx {
|
||||
uwsgi_param SCRIPT_NAME /searx;
|
||||
@ -179,6 +181,7 @@ Add this configuration in the server config file
|
||||
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
|
||||
}
|
||||
|
||||
|
||||
Enable base\_url in searx/settings.yml
|
||||
|
||||
::
|
||||
|
@ -68,28 +68,28 @@ certificate</a></p>
|
||||
<h2><a class="toc-backref" href="#id3">Basic installation</a><a class="headerlink" href="#basic-installation" title="Permalink to this headline">¶</a></h2>
|
||||
<p>For Ubuntu, be sure to have enable universe repository.</p>
|
||||
<p>Install packages:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev libffi-dev libssl-dev
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">git</span> <span class="n">build</span><span class="o">-</span><span class="n">essential</span> <span class="n">libxslt</span><span class="o">-</span><span class="n">dev</span> <span class="n">python</span><span class="o">-</span><span class="n">dev</span> <span class="n">python</span><span class="o">-</span><span class="n">virtualenv</span> <span class="n">python</span><span class="o">-</span><span class="n">pybabel</span> <span class="n">zlib1g</span><span class="o">-</span><span class="n">dev</span> <span class="n">libffi</span><span class="o">-</span><span class="n">dev</span> <span class="n">libssl</span><span class="o">-</span><span class="n">dev</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Install searx:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local
|
||||
sudo git clone https://github.com/asciimoo/searx.git
|
||||
sudo useradd searx -d /usr/local/searx
|
||||
sudo chown searx:searx -R /usr/local/searx
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">cd</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span>
|
||||
<span class="n">sudo</span> <span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">asciimoo</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">git</span>
|
||||
<span class="n">sudo</span> <span class="n">useradd</span> <span class="n">searx</span> <span class="o">-</span><span class="n">d</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span>
|
||||
<span class="n">sudo</span> <span class="n">chown</span> <span class="n">searx</span><span class="p">:</span><span class="n">searx</span> <span class="o">-</span><span class="n">R</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Install dependencies in a virtualenv:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo -u searx -i
|
||||
cd /usr/local/searx
|
||||
virtualenv searx-ve
|
||||
. ./searx-ve/bin/activate
|
||||
./manage.sh update_packages
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="o">-</span><span class="n">u</span> <span class="n">searx</span> <span class="o">-</span><span class="n">i</span>
|
||||
<span class="n">cd</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span>
|
||||
<span class="n">virtualenv</span> <span class="n">searx</span><span class="o">-</span><span class="n">ve</span>
|
||||
<span class="o">.</span> <span class="o">./</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span>
|
||||
<span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">update_packages</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="configuration">
|
||||
<h2><a class="toc-backref" href="#id4">Configuration</a><a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" searx/settings.yml
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="o">-</span><span class="n">e</span> <span class="s">"s/ultrasecretkey/`openssl rand -hex 16`/g"</span> <span class="n">searx</span><span class="o">/</span><span class="n">settings</span><span class="o">.</span><span class="n">yml</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Edit searx/settings.yml if necessary.</p>
|
||||
@ -97,12 +97,12 @@ virtualenv searx-ve
|
||||
<div class="section" id="check">
|
||||
<h2><a class="toc-backref" href="#id5">Check</a><a class="headerlink" href="#check" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Start searx:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>python searx/webapp.py
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">python</span> <span class="n">searx</span><span class="o">/</span><span class="n">webapp</span><span class="o">.</span><span class="n">py</span>
|
||||
</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="code sh highlight-python"><div class="highlight"><pre>sed -i -e "s/debug : True/debug : False/g" searx/settings.yml
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="o">-</span><span class="n">e</span> <span class="s">"s/debug : True/debug : False/g"</span> <span class="n">searx</span><span class="o">/</span><span class="n">settings</span><span class="o">.</span><span class="n">yml</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>At this point searx is not demonized ; uwsgi allows this.</p>
|
||||
@ -112,43 +112,43 @@ twice).</p>
|
||||
<div class="section" id="uwsgi">
|
||||
<h2><a class="toc-backref" href="#id6">uwsgi</a><a class="headerlink" href="#uwsgi" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Install packages:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install uwsgi uwsgi-plugin-python
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">uwsgi</span> <span class="n">uwsgi</span><span class="o">-</span><span class="n">plugin</span><span class="o">-</span><span class="n">python</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Create the configuration file /etc/uwsgi/apps-available/searx.ini with
|
||||
this content:</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre>[uwsgi]
|
||||
# Who will run the code
|
||||
uid = searx
|
||||
gid = searx
|
||||
<div class="highlight-default"><div class="highlight"><pre><span class="p">[</span><span class="n">uwsgi</span><span class="p">]</span>
|
||||
<span class="c"># Who will run the code</span>
|
||||
<span class="n">uid</span> <span class="o">=</span> <span class="n">searx</span>
|
||||
<span class="n">gid</span> <span class="o">=</span> <span class="n">searx</span>
|
||||
|
||||
# disable logging for privacy
|
||||
disable-logging = true
|
||||
<span class="c"># disable logging for privacy</span>
|
||||
<span class="n">disable</span><span class="o">-</span><span class="n">logging</span> <span class="o">=</span> <span class="n">true</span>
|
||||
|
||||
# Number of workers (usually CPU count)
|
||||
workers = 4
|
||||
<span class="c"># Number of workers (usually CPU count)</span>
|
||||
<span class="n">workers</span> <span class="o">=</span> <span class="mi">4</span>
|
||||
|
||||
# The right granted on the created socket
|
||||
chmod-socket = 666
|
||||
<span class="c"># The right granted on the created socket</span>
|
||||
<span class="n">chmod</span><span class="o">-</span><span class="n">socket</span> <span class="o">=</span> <span class="mi">666</span>
|
||||
|
||||
# Plugin to use and interpretor config
|
||||
single-interpreter = true
|
||||
master = true
|
||||
plugin = python
|
||||
<span class="c"># Plugin to use and interpretor config</span>
|
||||
<span class="n">single</span><span class="o">-</span><span class="n">interpreter</span> <span class="o">=</span> <span class="n">true</span>
|
||||
<span class="n">master</span> <span class="o">=</span> <span class="n">true</span>
|
||||
<span class="n">plugin</span> <span class="o">=</span> <span class="n">python</span>
|
||||
|
||||
# Module to import
|
||||
module = searx.webapp
|
||||
<span class="c"># Module to import</span>
|
||||
<span class="n">module</span> <span class="o">=</span> <span class="n">searx</span><span class="o">.</span><span class="n">webapp</span>
|
||||
|
||||
# Virtualenv and python path
|
||||
virtualenv = /usr/local/searx/searx-ve/
|
||||
pythonpath = /usr/local/searx/
|
||||
chdir = /usr/local/searx/searx/
|
||||
<span class="c"># Virtualenv and python path</span>
|
||||
<span class="n">virtualenv</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</span>
|
||||
<span class="n">pythonpath</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span>
|
||||
<span class="n">chdir</span> <span class="o">=</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Activate the uwsgi application and restart:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>cd /etc/uwsgi/apps-enabled
|
||||
ln -s ../apps-available/searx.ini
|
||||
/etc/init.d/uwsgi restart
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">cd</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">apps</span><span class="o">-</span><span class="n">enabled</span>
|
||||
<span class="n">ln</span> <span class="o">-</span><span class="n">s</span> <span class="o">../</span><span class="n">apps</span><span class="o">-</span><span class="n">available</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">ini</span>
|
||||
<span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">uwsgi</span> <span class="n">restart</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -158,28 +158,28 @@ ln -s ../apps-available/searx.ini
|
||||
<h3><a class="toc-backref" href="#id8">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="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install nginx
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">nginx</span>
|
||||
</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 /etc/nginx/sites-available/searx with this
|
||||
content:</p>
|
||||
<div class="code nginx highlight-python"><div class="highlight"><pre>server {
|
||||
listen 80;
|
||||
server_name searx.example.com;
|
||||
root /usr/local/searx;
|
||||
<div class="code nginx highlight-default"><div class="highlight"><pre><span class="n">server</span> <span class="p">{</span>
|
||||
<span class="n">listen</span> <span class="mi">80</span><span class="p">;</span>
|
||||
<span class="n">server_name</span> <span class="n">searx</span><span class="o">.</span><span class="n">example</span><span class="o">.</span><span class="n">com</span><span class="p">;</span>
|
||||
<span class="n">root</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span><span class="p">;</span>
|
||||
|
||||
location / {
|
||||
include uwsgi_params;
|
||||
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
|
||||
}
|
||||
}
|
||||
<span class="n">location</span> <span class="o">/</span> <span class="p">{</span>
|
||||
<span class="n">include</span> <span class="n">uwsgi_params</span><span class="p">;</span>
|
||||
<span class="n">uwsgi_pass</span> <span class="n">unix</span><span class="p">:</span><span class="o">/</span><span class="n">run</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">app</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">socket</span><span class="p">;</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Restart service:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
|
||||
sudo service uwsgi restart
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
|
||||
<span class="n">sudo</span> <span class="n">service</span> <span class="n">uwsgi</span> <span class="n">restart</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -187,9 +187,11 @@ sudo service uwsgi restart
|
||||
<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
|
||||
/etc/nginx/sites-available/default:</p>
|
||||
<div class="code nginx highlight-python"><div class="highlight"><pre>location = /searx { rewrite ^ /searx/; }
|
||||
<div class="code nginx highlight-default"><div class="highlight"><pre>location = /searx { rewrite ^ /searx/; }
|
||||
location /searx {
|
||||
try_files $uri @searx;
|
||||
proxy_pass http://localhost:9999/;
|
||||
proxy_set_header X-Script-Name /searx;
|
||||
}
|
||||
location @searx {
|
||||
uwsgi_param SCRIPT_NAME /searx;
|
||||
@ -200,12 +202,12 @@ location @searx {
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Enable base_url in searx/settings.yml</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre>base_url : http://your.domain.tld/searx/
|
||||
<div class="highlight-default"><div class="highlight"><pre><span class="n">base_url</span> <span class="p">:</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">your</span><span class="o">.</span><span class="n">domain</span><span class="o">.</span><span class="n">tld</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Restart service:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
|
||||
sudo service uwsgi restart
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
|
||||
<span class="n">sudo</span> <span class="n">service</span> <span class="n">uwsgi</span> <span class="n">restart</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="section" id="disable-logs">
|
||||
@ -213,12 +215,12 @@ sudo service uwsgi restart
|
||||
<p>for better privacy you can disable nginx logs about searx.</p>
|
||||
<p>how to proceed: below <code class="docutils literal"><span class="pre">uwsgi_pass</span></code> in
|
||||
/etc/nginx/sites-available/default add</p>
|
||||
<div class="highlight-python"><div class="highlight"><pre><span class="n">access_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
|
||||
<div class="highlight-default"><div class="highlight"><pre><span class="n">access_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
|
||||
<span class="n">error_log</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span><span class="p">;</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Restart service:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo service nginx restart
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">restart</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -227,23 +229,23 @@ sudo service uwsgi restart
|
||||
<div class="section" id="with-apache">
|
||||
<h3><a class="toc-backref" href="#id9">with apache</a><a class="headerlink" href="#with-apache" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Add wsgi mod:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo apt-get install libapache2-mod-uwsgi
|
||||
sudo a2enmod uwsgi
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">libapache2</span><span class="o">-</span><span class="n">mod</span><span class="o">-</span><span class="n">uwsgi</span>
|
||||
<span class="n">sudo</span> <span class="n">a2enmod</span> <span class="n">uwsgi</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Add this configuration in the file /etc/apache2/apache2.conf:</p>
|
||||
<div class="code apache highlight-python"><div class="highlight"><pre><Location />
|
||||
Options FollowSymLinks Indexes
|
||||
SetHandler uwsgi-handler
|
||||
uWSGISocket /run/uwsgi/app/searx/socket
|
||||
</Location>
|
||||
<div class="code apache highlight-default"><div class="highlight"><pre><span class="o"><</span><span class="n">Location</span> <span class="o">/></span>
|
||||
<span class="n">Options</span> <span class="n">FollowSymLinks</span> <span class="n">Indexes</span>
|
||||
<span class="n">SetHandler</span> <span class="n">uwsgi</span><span class="o">-</span><span class="n">handler</span>
|
||||
<span class="n">uWSGISocket</span> <span class="o">/</span><span class="n">run</span><span class="o">/</span><span class="n">uwsgi</span><span class="o">/</span><span class="n">app</span><span class="o">/</span><span class="n">searx</span><span class="o">/</span><span class="n">socket</span>
|
||||
<span class="o"></</span><span class="n">Location</span><span class="o">></span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Note that if your instance of searx is not at the root, you should
|
||||
change <code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/></span></code> by the location of your instance, like
|
||||
<code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/searx></span></code>.</p>
|
||||
<p>Restart Apache:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">apache2</span> <span class="n">restart</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="section" id="id1">
|
||||
@ -253,11 +255,11 @@ change <code class="docutils literal"><span class="pre"><Location</span> <spa
|
||||
<p>WARNING: you can only disable logs for the whole (virtual) server not
|
||||
for a specific path.</p>
|
||||
<p>Go back to /etc/apache2/apache2.conf and above <code class="docutils literal"><span class="pre"><Location</span> <span class="pre">/></span></code> add:</p>
|
||||
<div class="code apache highlight-python"><div class="highlight"><pre>CustomLog /dev/null combined
|
||||
<div class="code apache highlight-default"><div class="highlight"><pre><span class="n">CustomLog</span> <span class="o">/</span><span class="n">dev</span><span class="o">/</span><span class="n">null</span> <span class="n">combined</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Restart Apache:</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>sudo /etc/init.d/apache2 restart
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">apache2</span> <span class="n">restart</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -265,30 +267,30 @@ for a specific path.</p>
|
||||
</div>
|
||||
<div class="section" id="how-to-update">
|
||||
<h2><a class="toc-backref" href="#id10">How to update</a><a class="headerlink" href="#how-to-update" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>cd /usr/local/searx
|
||||
sudo -u searx -i
|
||||
. ./searx-ve/bin/activate
|
||||
git stash
|
||||
git pull origin master
|
||||
git stash apply
|
||||
./manage.sh update_packages
|
||||
sudo service uwsgi restart
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">cd</span> <span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">searx</span>
|
||||
<span class="n">sudo</span> <span class="o">-</span><span class="n">u</span> <span class="n">searx</span> <span class="o">-</span><span class="n">i</span>
|
||||
<span class="o">.</span> <span class="o">./</span><span class="n">searx</span><span class="o">-</span><span class="n">ve</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">activate</span>
|
||||
<span class="n">git</span> <span class="n">stash</span>
|
||||
<span class="n">git</span> <span class="n">pull</span> <span class="n">origin</span> <span class="n">master</span>
|
||||
<span class="n">git</span> <span class="n">stash</span> <span class="n">apply</span>
|
||||
<span class="o">./</span><span class="n">manage</span><span class="o">.</span><span class="n">sh</span> <span class="n">update_packages</span>
|
||||
<span class="n">sudo</span> <span class="n">service</span> <span class="n">uwsgi</span> <span class="n">restart</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="docker">
|
||||
<h2><a class="toc-backref" href="#id11">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="code sh highlight-python"><div class="highlight"><pre>docker pull wonderfall/searx
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre>docker pull wonderfall/searx
|
||||
docker run -d --name searx -p $PORT:8888 wonderfall/searx
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Go to <a class="reference external" href="http://localhost:$PORT">http://localhost:$PORT</a>.</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.</p>
|
||||
<p>It’s also possible to build searx from the embedded Dockerfile.</p>
|
||||
<div class="code sh highlight-python"><div class="highlight"><pre>git clone https://github.com/asciimoo/searx.git
|
||||
cd searx
|
||||
docker build -t whatever/searx .
|
||||
<div class="code sh highlight-default"><div class="highlight"><pre><span class="n">git</span> <span class="n">clone</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">asciimoo</span><span class="o">/</span><span class="n">searx</span><span class="o">.</span><span class="n">git</span>
|
||||
<span class="n">cd</span> <span class="n">searx</span>
|
||||
<span class="n">docker</span> <span class="n">build</span> <span class="o">-</span><span class="n">t</span> <span class="n">whatever</span><span class="o">/</span><span class="n">searx</span> <span class="o">.</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -171,6 +171,8 @@ Add this configuration in the server config file
|
||||
location = /searx { rewrite ^ /searx/; }
|
||||
location /searx {
|
||||
try_files $uri @searx;
|
||||
proxy_pass http://localhost:9999/;
|
||||
proxy_set_header X-Script-Name /searx;
|
||||
}
|
||||
location @searx {
|
||||
uwsgi_param SCRIPT_NAME /searx;
|
||||
@ -179,6 +181,7 @@ Add this configuration in the server config file
|
||||
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
|
||||
}
|
||||
|
||||
|
||||
Enable base\_url in searx/settings.yml
|
||||
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user