New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.10.0 - search page not found #686

Closed
nevtag opened this Issue Sep 7, 2016 · 25 comments

Comments

Projects
None yet
@nevtag

nevtag commented Sep 7, 2016

If I call searx, the page was loaded, but the search page not loaded.

searx-page-not-found

If I call it nativ, as shown in the install manual,
python searx/webapp.py
links2 http://localhost:8888
it works.

Configuration is manual like, with uwsgi and apache.

Apache log:
"GET /static/css/bootstrap.min.css HTTP/1.0" 304 185
"GET /static/js/jquery-1.11.1.min.js HTTP/1.0" 304 183
"GET /static/themes/oscar/css/leaflet.min.css HTTP/1.0" 304 183
"GET /static/themes/oscar/css/logicodev.min.css HTTP/1.0" 304 183
"GET /static/js/bootstrap.min.js HTTP/1.0" 304 184
"GET /static/js/require-2.1.15.min.js HTTP/1.0" 304 183
"GET /static/themes/oscar/js/searx.min.js HTTP/1.0" 304 183
"GET /static/plugins/js/search_on_category_select.js HTTP/1.0" 304 182
"GET /static/themes/oscar/img/favicon.png HTTP/1.0" 200 2326
"GET /opensearch.xml HTTP/1.0" 200 366
"GET / HTTP/1.0" 404 4218

@dalf

This comment has been minimized.

Show comment
Hide comment
@dalf

dalf Sep 7, 2016

Collaborator

Can you copy / paste your Apache configuration?

Collaborator

dalf commented Sep 7, 2016

Can you copy / paste your Apache configuration?

@nevtag

This comment has been minimized.

Show comment
Hide comment
@nevtag

nevtag Sep 7, 2016

<VirtualHost *:80>
ServerName searx.xxxx.de

<Location />
    Options FollowSymLinks Indexes
    SetHandler uwsgi-handler
    uWSGISocket /run/uwsgi/app/searx/socket
    Order deny,allow
    Deny from all
    Allow from ipservice-xxx.pools.vodafone-ip.de 
</Location>

ErrorLog /var/log/apache2/searx_de_error.log
LogLevel emerg
TransferLog /var/log/apache2/searx_de_access.log
</VirtualHost>

Well, I have tested it, with proxypass to localhost:8888 and start searx from hand, and that works.
So I think it must be a configuration problem with apache or uwsgi

nevtag commented Sep 7, 2016

<VirtualHost *:80>
ServerName searx.xxxx.de

<Location />
    Options FollowSymLinks Indexes
    SetHandler uwsgi-handler
    uWSGISocket /run/uwsgi/app/searx/socket
    Order deny,allow
    Deny from all
    Allow from ipservice-xxx.pools.vodafone-ip.de 
</Location>

ErrorLog /var/log/apache2/searx_de_error.log
LogLevel emerg
TransferLog /var/log/apache2/searx_de_access.log
</VirtualHost>

Well, I have tested it, with proxypass to localhost:8888 and start searx from hand, and that works.
So I think it must be a configuration problem with apache or uwsgi

@Grotax

This comment has been minimized.

Show comment
Hide comment
@Grotax

Grotax Sep 7, 2016

I have the same problem followed this tutorial https://asciimoo.github.io/searx/dev/install/installation.html
Found nothing in the apache2 log or the uwsgi/searx log also did enable debug mode in searx to get more infos but no errors.
Also note that "preferences" and "about" work.


<IfModule mod_ssl.c>
        <VirtualHost *:443>
                ServerAdmin ...
                ServerName ...

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined

                SSLEngine on

                SSLCertificateFile ...     
                SSLCertificateKeyFile ...
                SSLCertificateChainFile ...

                <Location />
                    Options FollowSymLinks Indexes
                    SetHandler uwsgi-handler
                    uWSGISocket /run/uwsgi/app/searx/socket
                </Location>
        </VirtualHost>
</IfModule>
[uwsgi]
# Who will run the code
uid = searx
gid = searx

# disable logging for privacy
disable-logging = false

# Number of workers (usually CPU count)
workers = 2

# The right granted on the created socket
chmod-socket = 666

# Plugin to use and interpretor config
single-interpreter = true
master = true
plugin = python

# Module to import
module = searx.webapp

# Virtualenv and python path
virtualenv = /usr/local/searx/searx-ve/
pythonpath = /usr/local/searx/
chdir = /usr/local/searx/searx/

Running it via python searx/webapp.py on my private ip did work for me.

Grotax commented Sep 7, 2016

I have the same problem followed this tutorial https://asciimoo.github.io/searx/dev/install/installation.html
Found nothing in the apache2 log or the uwsgi/searx log also did enable debug mode in searx to get more infos but no errors.
Also note that "preferences" and "about" work.


<IfModule mod_ssl.c>
        <VirtualHost *:443>
                ServerAdmin ...
                ServerName ...

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined

                SSLEngine on

                SSLCertificateFile ...     
                SSLCertificateKeyFile ...
                SSLCertificateChainFile ...

                <Location />
                    Options FollowSymLinks Indexes
                    SetHandler uwsgi-handler
                    uWSGISocket /run/uwsgi/app/searx/socket
                </Location>
        </VirtualHost>
</IfModule>
[uwsgi]
# Who will run the code
uid = searx
gid = searx

# disable logging for privacy
disable-logging = false

# Number of workers (usually CPU count)
workers = 2

# The right granted on the created socket
chmod-socket = 666

# Plugin to use and interpretor config
single-interpreter = true
master = true
plugin = python

# Module to import
module = searx.webapp

# Virtualenv and python path
virtualenv = /usr/local/searx/searx-ve/
pythonpath = /usr/local/searx/
chdir = /usr/local/searx/searx/

Running it via python searx/webapp.py on my private ip did work for me.

@nevtag

This comment has been minimized.

Show comment
Hide comment
@nevtag

nevtag Sep 7, 2016

My workaround is using the apache proxypass, so I can use it on my virtual root server.

<VirtualHost *:80>
ServerName searx.xxx.de

  ProxyPreserveHost On
  ProxyRequests Off
  ProxyPass / http://localhost:8888/
  ProxyPassReverse / http://localhost:8888/

<Location />
    Options FollowSymLinks Indexes
    #SetHandler uwsgi-handler
    #uWSGISocket /run/uwsgi/app/searx/socket
    Order deny,allow
    Deny from all
    Allow from ipservice-xxxx.pools.vodafone-ip.de 
</Location>

ErrorLog /var/log/apache2/searx_de_error.log
LogLevel emerg
TransferLog /var/log/apache2/searx_de_access.log
</VirtualHost>

nevtag commented Sep 7, 2016

My workaround is using the apache proxypass, so I can use it on my virtual root server.

<VirtualHost *:80>
ServerName searx.xxx.de

  ProxyPreserveHost On
  ProxyRequests Off
  ProxyPass / http://localhost:8888/
  ProxyPassReverse / http://localhost:8888/

<Location />
    Options FollowSymLinks Indexes
    #SetHandler uwsgi-handler
    #uWSGISocket /run/uwsgi/app/searx/socket
    Order deny,allow
    Deny from all
    Allow from ipservice-xxxx.pools.vodafone-ip.de 
</Location>

ErrorLog /var/log/apache2/searx_de_error.log
LogLevel emerg
TransferLog /var/log/apache2/searx_de_access.log
</VirtualHost>

@nevtag

This comment has been minimized.

Show comment
Hide comment
@nevtag

nevtag Sep 7, 2016

If I call searx.domain.com/search it is working.

nevtag commented Sep 7, 2016

If I call searx.domain.com/search it is working.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Sep 8, 2016

Same here - can confirm all findings with similar config:

  • / not working
  • /search gives search page, results post back to / which gives error again
  • about and prefs working
  • direct access works (http://localhost:8888/)

ghost commented Sep 8, 2016

Same here - can confirm all findings with similar config:

  • / not working
  • /search gives search page, results post back to / which gives error again
  • about and prefs working
  • direct access works (http://localhost:8888/)
@nevtag

This comment has been minimized.

Show comment
Hide comment
@nevtag

nevtag Sep 8, 2016

The problem is solved with apache mod_uwsgi_proxy.
searx.ini

[uwsgi]
socket = 127.0.0.1:8080

# Who will run the code
uid = searx
gid = searx

# disable logging for privacy
disable-logging = true 

# Number of workers (usually CPU count)
workers = 1

# The right granted on the created socket
chmod-socket = 666

# Plugin to use and interpretor config
single-interpreter = true
master = true
plugin = python

# Module to import
module = searx.webapp

# Virtualenv and python path
virtualenv = /usr/local/searx/searx-ve/
pythonpath = /usr/local/searx/
chdir = /usr/local/searx/searx/

apache searx.conf

    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / uwsgi://localhost:8080/
    ProxyPassReverse /  uwsgi://localhost:8080/

nevtag commented Sep 8, 2016

The problem is solved with apache mod_uwsgi_proxy.
searx.ini

[uwsgi]
socket = 127.0.0.1:8080

# Who will run the code
uid = searx
gid = searx

# disable logging for privacy
disable-logging = true 

# Number of workers (usually CPU count)
workers = 1

# The right granted on the created socket
chmod-socket = 666

# Plugin to use and interpretor config
single-interpreter = true
master = true
plugin = python

# Module to import
module = searx.webapp

# Virtualenv and python path
virtualenv = /usr/local/searx/searx-ve/
pythonpath = /usr/local/searx/
chdir = /usr/local/searx/searx/

apache searx.conf

    ProxyPreserveHost On
    ProxyRequests Off
    ProxyPass / uwsgi://localhost:8080/
    ProxyPassReverse /  uwsgi://localhost:8080/

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Sep 8, 2016

Working for me with mod_uwsgi_proxy - thanks!

ghost commented Sep 8, 2016

Working for me with mod_uwsgi_proxy - thanks!

@Grotax

This comment has been minimized.

Show comment
Hide comment
@Grotax

Grotax Sep 8, 2016

Changed my config. Now using mod_uwsgi_proxy, works.
Hint package name in Ubuntu: libapache2-mod-proxy-uwsgi

Thanks :)

Grotax commented Sep 8, 2016

Changed my config. Now using mod_uwsgi_proxy, works.
Hint package name in Ubuntu: libapache2-mod-proxy-uwsgi

Thanks :)

@MrPetovan

This comment has been minimized.

Show comment
Hide comment
@MrPetovan

MrPetovan Nov 11, 2016

Contributor

@asciimoo I still have this issue. I don't want to open any more port than I need, and the socket /run/uwsgi/app/searx/socket is correctly created by uwsgi. I followed the Installation page to the letter, the check passed and I didn't run python searx/webapp.py again after exiting the virtualenv bash.

Specs:

  • Debian Jessie
  • OpenSSL 1.0.1t, getting the Warning shown in #688
  • Apache 2.4.10

Config uwsgi:

[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

# Module to import
module = searx.webapp

# Virtualenv and python path
virtualenv = /usr/local/searx/searx-ve/
pythonpath = /usr/local/searx/
chdir = /usr/local/searx/searx/

Config Apache:

<IfModule mod_ssl.c>
<VirtualHost *:443>
  ServerName searx.example.com

  <Location />
    Options FollowSymLinks Indexes
    SetHandler uwsgi-handler
    uWSGISocket /run/uwsgi/app/searx/socket
  </Location>

  #CustomLog /dev/null combined

  SSLCertificateFile /etc/letsencrypt/live/searx.example.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/searx.example.com/privkey.pem

  Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

Log uswgi:

Fri Nov 11 06:06:09 2016 - *** Starting uWSGI 2.0.7-debian (64bit) on [Fri Nov 11 06:06:09 2016] ***
Fri Nov 11 06:06:09 2016 - compiled with version: 4.9.1 on 25 October 2014 19:17:54
Fri Nov 11 06:06:09 2016 - os: Linux-3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09)
Fri Nov 11 06:06:09 2016 - nodename: example.com
Fri Nov 11 06:06:09 2016 - machine: x86_64
Fri Nov 11 06:06:09 2016 - clock source: unix
Fri Nov 11 06:06:09 2016 - pcre jit disabled
Fri Nov 11 06:06:09 2016 - detected number of CPU cores: 8
Fri Nov 11 06:06:09 2016 - current working directory: /
Fri Nov 11 06:06:09 2016 - writing pidfile to /run/uwsgi/app/searx/pid
Fri Nov 11 06:06:09 2016 - detected binary path: /usr/bin/uwsgi-core
Fri Nov 11 06:06:09 2016 - setgid() to 1020
Fri Nov 11 06:06:09 2016 - setuid() to 1020
Fri Nov 11 06:06:09 2016 - your processes number limit is 31903
Fri Nov 11 06:06:09 2016 - your memory page size is 4096 bytes
Fri Nov 11 06:06:09 2016 - detected max file descriptor number: 1024
Fri Nov 11 06:06:09 2016 - lock engine: pthread robust mutexes
Fri Nov 11 06:06:09 2016 - thunder lock: disabled (you can enable it with --thunder-lock)
Fri Nov 11 06:06:09 2016 - uwsgi socket 0 bound to UNIX address /run/uwsgi/app/searx/socket fd 3
Fri Nov 11 06:06:09 2016 - Python version: 2.7.9 (default, Jun 29 2016, 13:11:10)  [GCC 4.9.2]
Fri Nov 11 06:06:09 2016 - Set PythonHome to /usr/local/searx/searx-ve/
Fri Nov 11 06:06:09 2016 - *** Python threads support is disabled. You can enable it with --enable-threads ***
Fri Nov 11 06:06:09 2016 - Python main interpreter initialized at 0x24009f0
Fri Nov 11 06:06:09 2016 - your server socket listen backlog is limited to 100 connections
Fri Nov 11 06:06:09 2016 - your mercy for graceful operations on workers is 60 seconds
Fri Nov 11 06:06:09 2016 - mapped 363840 bytes (355 KB) for 4 cores
Fri Nov 11 06:06:09 2016 - *** Operational MODE: preforking ***
Fri Nov 11 06:06:09 2016 - added /usr/local/searx/ to pythonpath.
WARNING:searx:You are using an old openssl version(OpenSSL 1.0.1t  3 May 2016), please upgrade above 1.0.2!
Fri Nov 11 06:06:12 2016 - WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x24009f0 pid: 30844 (default app)
Fri Nov 11 06:06:12 2016 - spawned uWSGI master process (pid: 30844)
Fri Nov 11 06:06:12 2016 - spawned uWSGI worker 1 (pid: 30877, cores: 1)
Fri Nov 11 06:06:12 2016 - spawned uWSGI worker 2 (pid: 30878, cores: 1)
Fri Nov 11 06:06:12 2016 - spawned uWSGI worker 3 (pid: 30879, cores: 1)
Fri Nov 11 06:06:12 2016 - spawned uWSGI worker 4 (pid: 30880, cores: 1)

Thanks in advance of any help.

Edit: More details: the search/settings.yml references a localhost:8888 server but nothing is listening on it.

settings.yml

server:
    port : 8888
    bind_address : "127.0.0.1" # address to listen on
    secret_key : "[actual secret]" # change this!
    base_url : False # Set custom base_url. Possible values: False or "https://your.custom.host/location/"
    image_proxy : False # Proxying image results through searx

I thought uwsgi was taking care of that?

Contributor

MrPetovan commented Nov 11, 2016

@asciimoo I still have this issue. I don't want to open any more port than I need, and the socket /run/uwsgi/app/searx/socket is correctly created by uwsgi. I followed the Installation page to the letter, the check passed and I didn't run python searx/webapp.py again after exiting the virtualenv bash.

Specs:

  • Debian Jessie
  • OpenSSL 1.0.1t, getting the Warning shown in #688
  • Apache 2.4.10

Config uwsgi:

[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

# Module to import
module = searx.webapp

# Virtualenv and python path
virtualenv = /usr/local/searx/searx-ve/
pythonpath = /usr/local/searx/
chdir = /usr/local/searx/searx/

Config Apache:

<IfModule mod_ssl.c>
<VirtualHost *:443>
  ServerName searx.example.com

  <Location />
    Options FollowSymLinks Indexes
    SetHandler uwsgi-handler
    uWSGISocket /run/uwsgi/app/searx/socket
  </Location>

  #CustomLog /dev/null combined

  SSLCertificateFile /etc/letsencrypt/live/searx.example.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/searx.example.com/privkey.pem

  Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

Log uswgi:

Fri Nov 11 06:06:09 2016 - *** Starting uWSGI 2.0.7-debian (64bit) on [Fri Nov 11 06:06:09 2016] ***
Fri Nov 11 06:06:09 2016 - compiled with version: 4.9.1 on 25 October 2014 19:17:54
Fri Nov 11 06:06:09 2016 - os: Linux-3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09)
Fri Nov 11 06:06:09 2016 - nodename: example.com
Fri Nov 11 06:06:09 2016 - machine: x86_64
Fri Nov 11 06:06:09 2016 - clock source: unix
Fri Nov 11 06:06:09 2016 - pcre jit disabled
Fri Nov 11 06:06:09 2016 - detected number of CPU cores: 8
Fri Nov 11 06:06:09 2016 - current working directory: /
Fri Nov 11 06:06:09 2016 - writing pidfile to /run/uwsgi/app/searx/pid
Fri Nov 11 06:06:09 2016 - detected binary path: /usr/bin/uwsgi-core
Fri Nov 11 06:06:09 2016 - setgid() to 1020
Fri Nov 11 06:06:09 2016 - setuid() to 1020
Fri Nov 11 06:06:09 2016 - your processes number limit is 31903
Fri Nov 11 06:06:09 2016 - your memory page size is 4096 bytes
Fri Nov 11 06:06:09 2016 - detected max file descriptor number: 1024
Fri Nov 11 06:06:09 2016 - lock engine: pthread robust mutexes
Fri Nov 11 06:06:09 2016 - thunder lock: disabled (you can enable it with --thunder-lock)
Fri Nov 11 06:06:09 2016 - uwsgi socket 0 bound to UNIX address /run/uwsgi/app/searx/socket fd 3
Fri Nov 11 06:06:09 2016 - Python version: 2.7.9 (default, Jun 29 2016, 13:11:10)  [GCC 4.9.2]
Fri Nov 11 06:06:09 2016 - Set PythonHome to /usr/local/searx/searx-ve/
Fri Nov 11 06:06:09 2016 - *** Python threads support is disabled. You can enable it with --enable-threads ***
Fri Nov 11 06:06:09 2016 - Python main interpreter initialized at 0x24009f0
Fri Nov 11 06:06:09 2016 - your server socket listen backlog is limited to 100 connections
Fri Nov 11 06:06:09 2016 - your mercy for graceful operations on workers is 60 seconds
Fri Nov 11 06:06:09 2016 - mapped 363840 bytes (355 KB) for 4 cores
Fri Nov 11 06:06:09 2016 - *** Operational MODE: preforking ***
Fri Nov 11 06:06:09 2016 - added /usr/local/searx/ to pythonpath.
WARNING:searx:You are using an old openssl version(OpenSSL 1.0.1t  3 May 2016), please upgrade above 1.0.2!
Fri Nov 11 06:06:12 2016 - WSGI app 0 (mountpoint='') ready in 3 seconds on interpreter 0x24009f0 pid: 30844 (default app)
Fri Nov 11 06:06:12 2016 - spawned uWSGI master process (pid: 30844)
Fri Nov 11 06:06:12 2016 - spawned uWSGI worker 1 (pid: 30877, cores: 1)
Fri Nov 11 06:06:12 2016 - spawned uWSGI worker 2 (pid: 30878, cores: 1)
Fri Nov 11 06:06:12 2016 - spawned uWSGI worker 3 (pid: 30879, cores: 1)
Fri Nov 11 06:06:12 2016 - spawned uWSGI worker 4 (pid: 30880, cores: 1)

Thanks in advance of any help.

Edit: More details: the search/settings.yml references a localhost:8888 server but nothing is listening on it.

settings.yml

server:
    port : 8888
    bind_address : "127.0.0.1" # address to listen on
    secret_key : "[actual secret]" # change this!
    base_url : False # Set custom base_url. Possible values: False or "https://your.custom.host/location/"
    image_proxy : False # Proxying image results through searx

I thought uwsgi was taking care of that?

@asciimoo

This comment has been minimized.

Show comment
Hide comment
@asciimoo

asciimoo Nov 11, 2016

Owner

@Hypolite port and bind_address in settings.yml is used only if you run it without uwsgi (python searx/webapp.py).

Owner

asciimoo commented Nov 11, 2016

@Hypolite port and bind_address in settings.yml is used only if you run it without uwsgi (python searx/webapp.py).

@MrPetovan

This comment has been minimized.

Show comment
Hide comment
@MrPetovan

MrPetovan Nov 11, 2016

Contributor

@asciimoo Thanks for the prompt response, others have circumvented the issue by manually running the Python app listening to the provided port, but I'd rather not do that. Do you have any clue/debug hints to fix this / page issue? I'm sorry I don't have any Python background to debug it myself.

I'd love to have a functional searx node without having to resort to tricks.

Contributor

MrPetovan commented Nov 11, 2016

@asciimoo Thanks for the prompt response, others have circumvented the issue by manually running the Python app listening to the provided port, but I'd rather not do that. Do you have any clue/debug hints to fix this / page issue? I'm sorry I don't have any Python background to debug it myself.

I'd love to have a functional searx node without having to resort to tricks.

@MrPetovan

This comment has been minimized.

Show comment
Hide comment
@MrPetovan

MrPetovan Nov 12, 2016

Contributor

For anyone else wondering, the package libapache2-mod-proxy-uwsgi doesn't work with Unix sockets until version 2.0.11. However, the Debian Jessie package still is in version 2.0.7 despite the fact that the Apache2 package is more recent and allows Unix sockets in ProxyPass directives.

Contributor

MrPetovan commented Nov 12, 2016

For anyone else wondering, the package libapache2-mod-proxy-uwsgi doesn't work with Unix sockets until version 2.0.11. However, the Debian Jessie package still is in version 2.0.7 despite the fact that the Apache2 package is more recent and allows Unix sockets in ProxyPass directives.

@vedranmiletic

This comment has been minimized.

Show comment
Hide comment
@vedranmiletic

vedranmiletic Aug 10, 2017

I can confirm same issue on Apache 2.4.25 on Debian 9. Doesn't happen on Nginx with Debian 9. I'm using the same configuration as the installation docs.

vedranmiletic commented Aug 10, 2017

I can confirm same issue on Apache 2.4.25 on Debian 9. Doesn't happen on Nginx with Debian 9. I'm using the same configuration as the installation docs.

@vedranmiletic

This comment has been minimized.

Show comment
Hide comment
@vedranmiletic

vedranmiletic Aug 10, 2017

I got it working with mod_proxy_uwsgi as suggested above, I'll provide a patch for the docs.

vedranmiletic commented Aug 10, 2017

I got it working with mod_proxy_uwsgi as suggested above, I'll provide a patch for the docs.

@valodiadeseynes

This comment has been minimized.

Show comment
Hide comment
@valodiadeseynes

valodiadeseynes Sep 28, 2017

I'm technically still having this issue with version 0.12.0 on Debian 9 (with apache2). However, I've found a solution by changing searx's location with apache from / to /searx and it works.

Here is an excerpt from my apache config:

            RewriteEngine on
            RewriteRule   "^/$"  "/searx/"  [R]
            <Location /searx>
                Options FollowSymLinks Indexes
                SetHandler uwsgi-handler
                uWSGISocket /run/uwsgi/app/searx/socket
            </Location>

The other solutions in this thread didn't work for me but this one does. Just throwing it out there in case somebody else is in my situation.

valodiadeseynes commented Sep 28, 2017

I'm technically still having this issue with version 0.12.0 on Debian 9 (with apache2). However, I've found a solution by changing searx's location with apache from / to /searx and it works.

Here is an excerpt from my apache config:

            RewriteEngine on
            RewriteRule   "^/$"  "/searx/"  [R]
            <Location /searx>
                Options FollowSymLinks Indexes
                SetHandler uwsgi-handler
                uWSGISocket /run/uwsgi/app/searx/socket
            </Location>

The other solutions in this thread didn't work for me but this one does. Just throwing it out there in case somebody else is in my situation.

@MrPetovan

This comment has been minimized.

Show comment
Hide comment
@MrPetovan

MrPetovan Oct 19, 2017

Contributor

I just tried to reinstall searx 0.12.0 from the installation docs and everything went well. Not sure what I did wrong the first time.

Contributor

MrPetovan commented Oct 19, 2017

I just tried to reinstall searx 0.12.0 from the installation docs and everything went well. Not sure what I did wrong the first time.

@Vertux

This comment has been minimized.

Show comment
Hide comment
@Vertux

Vertux Jun 10, 2018

This issue still persists with v0.14.0 (I just did a fresh install on a Ubuntu 16.04 server), the libapache2-mod-proxy-uwsgi solution, does not solve the problem for me. It would be nice if you could take a closer look into this issue @asciimoo

@valodiadeseynes modification solves the issue but leads into another problem, which I have mentioned here, at that time I did nit know that the rewrite rule triggers the issue.

@MrPetovan I really would like to know why the issue disappeared suddenly - I did the installation twice and followed exactly the installation docs like you, but it still does not work. I have no idea what to do.

Vertux commented Jun 10, 2018

This issue still persists with v0.14.0 (I just did a fresh install on a Ubuntu 16.04 server), the libapache2-mod-proxy-uwsgi solution, does not solve the problem for me. It would be nice if you could take a closer look into this issue @asciimoo

@valodiadeseynes modification solves the issue but leads into another problem, which I have mentioned here, at that time I did nit know that the rewrite rule triggers the issue.

@MrPetovan I really would like to know why the issue disappeared suddenly - I did the installation twice and followed exactly the installation docs like you, but it still does not work. I have no idea what to do.

@MrPetovan

This comment has been minimized.

Show comment
Hide comment
@MrPetovan

MrPetovan Jun 10, 2018

Contributor

@Vertux I’m sorry, I kept getting timeouts while retrieving results, so I removed searx entirely from my system.

Contributor

MrPetovan commented Jun 10, 2018

@Vertux I’m sorry, I kept getting timeouts while retrieving results, so I removed searx entirely from my system.

@Pofilo

This comment has been minimized.

Show comment
Hide comment
@Pofilo

Pofilo Jun 11, 2018

Collaborator

@Vertux what procedure did you use to install Searx ?
Just installed again according to the documentation and it works fine (v0.14.0).

Let's try to understand and fix the problem !

To figure out if it is an apache misconfiguration, can you try to access http://localhost:8888 (or what you configured in setting.yml) directly on your server ?
If you only have access to the console (no desktop interface), you can install elinks (apt-get install elinks) and type elinks in your terminal and then the url.
Wikipedia page about elinks.

You should get something like that:
searx_elinks

If it doesn't work, you'll get something like that:
searx_elinks_404

If it works, can you give us your apache configuration ? (be careful to not reveal something private in it)

Collaborator

Pofilo commented Jun 11, 2018

@Vertux what procedure did you use to install Searx ?
Just installed again according to the documentation and it works fine (v0.14.0).

Let's try to understand and fix the problem !

To figure out if it is an apache misconfiguration, can you try to access http://localhost:8888 (or what you configured in setting.yml) directly on your server ?
If you only have access to the console (no desktop interface), you can install elinks (apt-get install elinks) and type elinks in your terminal and then the url.
Wikipedia page about elinks.

You should get something like that:
searx_elinks

If it doesn't work, you'll get something like that:
searx_elinks_404

If it works, can you give us your apache configuration ? (be careful to not reveal something private in it)

@Vertux

This comment has been minimized.

Show comment
Hide comment
@Vertux

Vertux Jun 11, 2018

@Pofilo thank you for the response.
I did the "classic" installation with Git with default values. If I start searx on the console (without uwsgi), the access with links/curl works fine, no problem. But when Apache and uwsgi comes into play and I access the subdomain I get the "Page not found" @nevtag already mentioned. If I add "/search/" to the subdomain name I get the right search page, which works fine.
At the moment I have shut down my public searx instance. Just for information it is a V-Root-Server with Plesk running Ubuntu 16.04. It is really a weird behavior - although it is a pretty "simple" installation.

I just got the idea, that ModSecurity could be the reason for these issues - I have to check this, if I have a little more time.

Appendix: I did another test installation in a VM (Ubuntu 16.04) on a local server with Nignx, which runs perfectly fine.

Vertux commented Jun 11, 2018

@Pofilo thank you for the response.
I did the "classic" installation with Git with default values. If I start searx on the console (without uwsgi), the access with links/curl works fine, no problem. But when Apache and uwsgi comes into play and I access the subdomain I get the "Page not found" @nevtag already mentioned. If I add "/search/" to the subdomain name I get the right search page, which works fine.
At the moment I have shut down my public searx instance. Just for information it is a V-Root-Server with Plesk running Ubuntu 16.04. It is really a weird behavior - although it is a pretty "simple" installation.

I just got the idea, that ModSecurity could be the reason for these issues - I have to check this, if I have a little more time.

Appendix: I did another test installation in a VM (Ubuntu 16.04) on a local server with Nignx, which runs perfectly fine.

@matzZz

This comment has been minimized.

Show comment
Hide comment
@matzZz

matzZz Aug 16, 2018

Put ‚DirectoryIndex disabled‘ in .htaccess.
Works for me.

matzZz commented Aug 16, 2018

Put ‚DirectoryIndex disabled‘ in .htaccess.
Works for me.

@joshp23

This comment has been minimized.

Show comment
Hide comment
@joshp23

joshp23 Aug 23, 2018

Running searx 14 on ubuntu 16.04 with apache2, same errors and behavior:

  • when attempting to use wsgi according to the docs here I get a "file not found" error.
  • when running manually with python searx/webapp.py and using mod_proxy in apache, it works.
  • using the libapache2-mod-proxy-uwsgi solution provided by @nevtag works.

It would be great if this were in the docs ;)

joshp23 commented Aug 23, 2018

Running searx 14 on ubuntu 16.04 with apache2, same errors and behavior:

  • when attempting to use wsgi according to the docs here I get a "file not found" error.
  • when running manually with python searx/webapp.py and using mod_proxy in apache, it works.
  • using the libapache2-mod-proxy-uwsgi solution provided by @nevtag works.

It would be great if this were in the docs ;)

@xinomilo

This comment has been minimized.

Show comment
Hide comment
@xinomilo

xinomilo Sep 17, 2018

just came uppon this while moving from nginx to an apache2 server....
what worked for me, was just adding
RewriteEngine on
just before
<Location / >
Everything else was exactly according to instructions. no extra ports or proxies. apache2+uwsgi just like with nginx.

if someone can doublecheck/confirm this, then an update on docs would solve this for others as well, as it seems a common issue for apache users.

xinomilo commented Sep 17, 2018

just came uppon this while moving from nginx to an apache2 server....
what worked for me, was just adding
RewriteEngine on
just before
<Location / >
Everything else was exactly according to instructions. no extra ports or proxies. apache2+uwsgi just like with nginx.

if someone can doublecheck/confirm this, then an update on docs would solve this for others as well, as it seems a common issue for apache users.

@xinomilo

This comment has been minimized.

Show comment
Hide comment
@xinomilo

xinomilo Sep 17, 2018

but because i needed some web headers, without me messing searx installation (#715 (comment)) , i went to reverse proxying solution with apache proxy_uwsgi module according to this : #686 (comment)

xinomilo commented Sep 17, 2018

but because i needed some web headers, without me messing searx installation (#715 (comment)) , i went to reverse proxying solution with apache proxy_uwsgi module according to this : #686 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment