WebFaction
Community site: login faq

I'm about to run the searchd daemon for Sphinx search, which listens on a set of ports on the server for a "mysql-like" connection. The searchd configuration notes don't how any way of securing it.

I see that people have inquired here about running Sphinx -- is there any reasonable way to give the daemon at least the security that mysql provides?

asked 07 Jun '15, 20:14

cesnn
93513
accept rate: 14%


According to the sphinx documentation, sockets are supported. If you use a socket instead of a port, you can take advantage of filesystem permissions in order to secure the search daemon:

listen = ( address ":" port | port | path ) [ ":" protocol ] [ "_vip" ]
I.e. you can specify either an IP address (or hostname) and port number, or just a port number, or Unix socket path.

So, something like this:

listen = /home/user/searchd.sock
permanent link

answered 08 Jun '15, 00:20

ryans ♦♦
5.0k93460
accept rate: 43%

Thanks, ryans.

Worked like a charm, after a little digging into the Sphinxit and oursql documentation.

I can now access the searchd daemon from the command line like so:

mysql --socket=/home/user/searchd.sock

The Sphinxit configuration class has a SEARCHD_CONNECTION parameter, which just passes on its contents to oursql.Connection, so my configuration setup in Sphinxit looks about like this:

class SphinxitConfig(BaseSearchConfig):
    WITH_META = False 
    WITH_STATUS = False
    SEARCHD_CONNECTION = {
       'unix_socket' : '/home/user/searchd.sock',
    }
permanent link

answered 08 Jun '15, 14:37

cesnn
93513
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×69
×5

question asked: 07 Jun '15, 20:14

question was seen: 2,148 times

last updated: 08 Jun '15, 14:37

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM