summaryrefslogtreecommitdiff
path: root/debian/tests/apache2
blob: 37ea62e60a6e6686d8ae2cd459556fd853ced287 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

set -ex

rm /etc/apache2/sites-enabled/000-default.conf
cp /usr/share/doc/searx/examples/apache2/sites-available/searx.conf /etc/apache2/sites-available/
ln -s ../sites-available/searx.conf /etc/apache2/sites-enabled/searx.conf
a2enmod proxy
a2enmod proxy_uwsgi
a2enmod uwsgi

cp /usr/share/doc/searx/examples/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-available
ln -s ../apps-available/searx.ini /etc/uwsgi/apps-enabled/searx.ini
mkdir /etc/searx
cp /usr/share/doc/searx/examples/settings.yml /etc/searx/settings.yml
sed -i -e "s/ultrasecretkey/$(openssl rand -hex 16)/g" /etc/searx/settings.yml
systemctl restart apache2
systemctl restart uwsgi
sleep 5
systemctl status apache2
systemctl status uwsgi
cat /var/log/uwsgi/app/searx.log
curl http://localhost/searx/
curl http://localhost/searx/ | grep '<input type="search".* name="q"'