<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>7.1.5. groonga-httpd — Groonga v5.0.1-42-g4d10df1 documentation</title> <link rel="stylesheet" href="../../_static/groonga.css" type="text/css" /> <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../../', VERSION: '5.0.1-42-g4d10df1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../../_static/jquery.js"></script> <script type="text/javascript" src="../../_static/underscore.js"></script> <script type="text/javascript" src="../../_static/doctools.js"></script> <link rel="shortcut icon" href="../../_static/favicon.ico"/> <link rel="top" title="Groonga v5.0.1-42-g4d10df1 documentation" href="../../index.html" /> <link rel="up" title="7.1. Executables" href="../executables.html" /> <link rel="next" title="7.1.6. groonga HTTPサーバー" href="groonga-server-http.html" /> <link rel="prev" title="7.1.4. groonga-benchmark" href="groonga-benchmark.html" /> </head> <body> <div class="header"> <h1 class="title"> <a id="top-link" href="../../index.html"> <span class="project">groonga</span> <span class="separator">-</span> <span class="description">An open-source fulltext search engine and column store.</span> </a> </h1> <div class="other-language-links"> <ul> <li><a href="../../../../ja/html/reference/executables/groonga-httpd.html"><img src="../../_static/jp.png" alt="日本語">日本語版はこちら</a></li> </ul> </div> </div> <div class="related"> <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="groonga-server-http.html" title="7.1.6. groonga HTTPサーバー" accesskey="N">next</a> |</li> <li class="right" > <a href="groonga-benchmark.html" title="7.1.4. groonga-benchmark" accesskey="P">previous</a> |</li> <li><a href="../../index.html">Groonga v5.0.1-42-g4d10df1 documentation</a> »</li> <li><a href="../../reference.html" >7. Reference manual</a> »</li> <li><a href="../executables.html" accesskey="U">7.1. Executables</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="groonga-httpd"> <h1>7.1.5. groonga-httpd<a class="headerlink" href="#groonga-httpd" title="Permalink to this headline">¶</a></h1> <div class="section" id="summary"> <h2>7.1.5.1. Summary<a class="headerlink" href="#summary" title="Permalink to this headline">¶</a></h2> <p>groonga-httpd is a program to communicate with a Groonga server using the HTTP protocol. It functions as same as <a class="reference internal" href="groonga-server-http.html"><em>groonga HTTPサーバー</em></a>. Although <a class="reference internal" href="groonga-server-http.html"><em>groonga HTTPサーバー</em></a> has limited support for HTTP with a minimal built-in HTTP server, groonga-httpd has full support for HTTP with an embedded <a class="reference external" href="http://nginx.org/">nginx</a>. All standards-compliance and features provided by nginx is also available in groonga-httpd.</p> <p>groonga-httpd has an Web-based administration tool implemented with HTML and JavaScript. You can access to it from <a class="reference external" href="http://hostname:port/">http://hostname:port/</a>.</p> </div> <div class="section" id="synopsis"> <h2>7.1.5.2. Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2> <div class="highlight-none"><div class="highlight"><pre>groonga-httpd [nginx options] </pre></div> </div> </div> <div class="section" id="usage"> <h2>7.1.5.3. Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2> <div class="section" id="set-up"> <h3>7.1.5.3.1. Set up<a class="headerlink" href="#set-up" title="Permalink to this headline">¶</a></h3> <p>First, you'll need to edit the groonga-httpd configuration file to specify a database. Edit /etc/groonga/httpd/groonga-httpd.conf to enable the <tt class="docutils literal"><span class="pre">groonga_database</span></tt> directive like this:</p> <div class="highlight-none"><div class="highlight"><pre># Match this to the file owner of groonga database files if groonga-httpd is # run as root. #user groonga; ... http { ... # Don't change the location; currently only /d/ is supported. location /d/ { groonga on; # <= This means to turn on groonga-httpd. # Specify an actual database and enable this. groonga_database /var/lib/groonga/db/db; } ... } </pre></div> </div> <p>Then, run groonga-httpd. Note that the control immediately returns back to the console because groonga-httpd runs as a daemon process by default.:</p> <div class="highlight-none"><div class="highlight"><pre>% groonga-httpd </pre></div> </div> </div> <div class="section" id="request-queries"> <h3>7.1.5.3.2. Request queries<a class="headerlink" href="#request-queries" title="Permalink to this headline">¶</a></h3> <p>To check, request a simple query (<a class="reference internal" href="../commands/status.html"><em>status</em></a>).</p> <p>Execution example:</p> <div class="highlight-none"><div class="highlight"><pre>% curl http://localhost:10041/d/status [ [ 0, 1337566253.89858, 0.000355720520019531 ], { "uptime": 0, "max_command_version": 2, "n_queries": 0, "cache_hit_rate": 0.0, "version": "4.0.1", "alloc_count": 161, "command_version": 1, "starttime": 1395806036, "default_command_version": 1 } ] </pre></div> </div> </div> <div class="section" id="loading-data-by-post"> <h3>7.1.5.3.3. Loading data by POST<a class="headerlink" href="#loading-data-by-post" title="Permalink to this headline">¶</a></h3> <p>The feature of groonga-httpd in contrast to groonga is supporting POST method.</p> <p>You can load data by POST JSON data.</p> <p>Here is an example curl command line that loads two users alice and bob to Users table:</p> <div class="highlight-none"><div class="highlight"><pre>% curl --data-binary '[{"_key": "alice"}, {"_key": "bob"}]' -H "Content-Type: application/json" "http://localhost:10041/d/load?table=Users" </pre></div> </div> <p>If you loads users from JSON file, prepare JSON file like this:</p> <div class="highlight-none"><div class="highlight"><pre>[ {"_key": "alice"}, {"_key": "bob"} ] </pre></div> </div> <p>Then specify JSON file in curl command line:</p> <div class="highlight-none"><div class="highlight"><pre>% curl -X POST 'http://localhost:10041/d/load?table=Users' -H 'Content-Type: application/json' -d @users.json </pre></div> </div> </div> <div class="section" id="browse-the-administration-tool"> <h3>7.1.5.3.4. Browse the administration tool<a class="headerlink" href="#browse-the-administration-tool" title="Permalink to this headline">¶</a></h3> <p>Also, you can browse Web-based administration tool at <a class="reference external" href="http://localhost:10041/">http://localhost:10041/</a>.</p> </div> <div class="section" id="shut-down"> <h3>7.1.5.3.5. Shut down<a class="headerlink" href="#shut-down" title="Permalink to this headline">¶</a></h3> <p>Finally, to terminate the running groonga-httpd daemon, run this:</p> <div class="highlight-none"><div class="highlight"><pre>% groonga-httpd -s stop </pre></div> </div> </div> </div> <div class="section" id="configuration-directives"> <h2>7.1.5.4. Configuration directives<a class="headerlink" href="#configuration-directives" title="Permalink to this headline">¶</a></h2> <p>This section decribes only important directives. They are groonga-httpd specific directives and performance related directives.</p> <p>The following directives can be used in the groonga-httpd configuration file. By default, it's located at /etc/groonga/httpd/groonga-httpd.conf.</p> <div class="section" id="groonga-httpd-specific-directives"> <h3>7.1.5.4.1. Groonga-httpd specific directives<a class="headerlink" href="#groonga-httpd-specific-directives" title="Permalink to this headline">¶</a></h3> <p>The following directives aren't provided by nginx. They are provided by groonga-httpd to configure groonga-httpd specific configurations.</p> <div class="section" id="groonga"> <h4>7.1.5.4.1.1. <tt class="docutils literal"><span class="pre">groonga</span></tt><a class="headerlink" href="#groonga" title="Permalink to this headline">¶</a></h4> <p>Synopsis:</p> <div class="highlight-none"><div class="highlight"><pre>groonga on | off; </pre></div> </div> <dl class="docutils"> <dt>Default</dt> <dd><tt class="docutils literal"><span class="pre">groonga</span> <span class="pre">off;</span></tt></dd> <dt>Context</dt> <dd><tt class="docutils literal"><span class="pre">location</span></tt></dd> </dl> <p>Specifies whether Groonga is enabled in the <tt class="docutils literal"><span class="pre">location</span></tt> block. The default is <tt class="docutils literal"><span class="pre">off</span></tt>. You need to specify <tt class="docutils literal"><span class="pre">on</span></tt> to enable groonga.</p> <p>Examples:</p> <div class="highlight-none"><div class="highlight"><pre>location /d/ { groonga on; # Enables groonga under /d/... path } location /d/ { groonga off; # Disables groonga under /d/... path } </pre></div> </div> </div> <div class="section" id="groonga-database"> <span id="id1"></span><h4>7.1.5.4.1.2. <tt class="docutils literal"><span class="pre">groonga_database</span></tt><a class="headerlink" href="#groonga-database" title="Permalink to this headline">¶</a></h4> <p>Synopsis:</p> <div class="highlight-none"><div class="highlight"><pre>groonga_database /path/to/groonga/database; </pre></div> </div> <dl class="docutils"> <dt>Default</dt> <dd><tt class="docutils literal"><span class="pre">groonga_database</span> <span class="pre">/usr/local/var/lib/groonga/db/db;</span></tt></dd> <dt>Context</dt> <dd><tt class="docutils literal"><span class="pre">http</span></tt>, <tt class="docutils literal"><span class="pre">server</span></tt>, <tt class="docutils literal"><span class="pre">location</span></tt></dd> </dl> <p>Specifies the path to a Groonga database. This is the required directive.</p> </div> <div class="section" id="groonga-database-auto-create"> <span id="id2"></span><h4>7.1.5.4.1.3. <tt class="docutils literal"><span class="pre">groonga_database_auto_create</span></tt><a class="headerlink" href="#groonga-database-auto-create" title="Permalink to this headline">¶</a></h4> <p>Synopsis:</p> <div class="highlight-none"><div class="highlight"><pre>groonga_database_auto_create on | off; </pre></div> </div> <dl class="docutils"> <dt>Default</dt> <dd><tt class="docutils literal"><span class="pre">groonga_database_auto_create</span> <span class="pre">on;</span></tt></dd> <dt>Context</dt> <dd><tt class="docutils literal"><span class="pre">http</span></tt>, <tt class="docutils literal"><span class="pre">server</span></tt>, <tt class="docutils literal"><span class="pre">location</span></tt></dd> </dl> <p>Specifies whether Groonga database is created automatically or not. If the value is <tt class="docutils literal"><span class="pre">on</span></tt> and the Groonga database specified by <a class="reference internal" href="#groonga-database"><em>groonga_database</em></a> doesn't exist, the Groonga database is created automatically. If the Groonga database exists, groonga-httpd does nothing.</p> <p>If parent directory doesn't exist, parent directory is also created recursively.</p> <p>The default value is <tt class="docutils literal"><span class="pre">on</span></tt>. Normally, the value doesn't need to be changed.</p> </div> <div class="section" id="groonga-base-path"> <h4>7.1.5.4.1.4. <tt class="docutils literal"><span class="pre">groonga_base_path</span></tt><a class="headerlink" href="#groonga-base-path" title="Permalink to this headline">¶</a></h4> <p>Synopsis:</p> <div class="highlight-none"><div class="highlight"><pre>groonga_base_path /d/; </pre></div> </div> <dl class="docutils"> <dt>Default</dt> <dd>The same value as <tt class="docutils literal"><span class="pre">location</span></tt> name.</dd> <dt>Context</dt> <dd><tt class="docutils literal"><span class="pre">location</span></tt></dd> </dl> <p>Specifies the base path in URI. Groonga uses <tt class="docutils literal"><span class="pre">/d/command?parameter1=value1&...</span></tt> path to run <tt class="docutils literal"><span class="pre">command</span></tt>. The form of path in used in groonga-httpd but groonga-httpd also supports <tt class="docutils literal"><span class="pre">/other-prefix/command?parameter1=value1&...</span></tt> form. To support the form, groonga-httpd removes the base path from the head of request URI and prepend <tt class="docutils literal"><span class="pre">/d/</span></tt> to the processed request URI. By the path conversion, users can use custom path prefix and Groonga can always uses <tt class="docutils literal"><span class="pre">/d/command?parameter1=value1&...</span></tt> form.</p> <p>Nomally, this directive isn't needed. It is needed for per command configuration.</p> <p>Here is an example configuration to add authorization to <a class="reference internal" href="../commands/shutdown.html"><em>shutdown</em></a> command:</p> <div class="highlight-none"><div class="highlight"><pre>groonga_database /var/lib/groonga/db/db; location /d/shutdown { groonga on; # groonga_base_path is needed. # Because /d/shutdown is handled as the base path. # Without this configuration, /d/shutdown/shutdown path is required # to run shutdown command. groonga_base_path /d/; auth_basic "manager is required!"; auth_basic_user_file "/etc/managers.htpasswd"; } location /d/ { groonga on; # groonga_base_path doesn't needed. # Because location name is the base path. } </pre></div> </div> </div> <div class="section" id="groonga-log-path"> <span id="id3"></span><h4>7.1.5.4.1.5. <tt class="docutils literal"><span class="pre">groonga_log_path</span></tt><a class="headerlink" href="#groonga-log-path" title="Permalink to this headline">¶</a></h4> <p>Synopsis:</p> <div class="highlight-none"><div class="highlight"><pre>groonga_log_path path | off; </pre></div> </div> <dl class="docutils"> <dt>Default</dt> <dd><tt class="docutils literal"><span class="pre">/var/log/groonga/httpd/groonga.log</span></tt></dd> <dt>Context</dt> <dd><tt class="docutils literal"><span class="pre">http</span></tt>, <tt class="docutils literal"><span class="pre">server</span></tt>, <tt class="docutils literal"><span class="pre">location</span></tt></dd> </dl> <p>Specifies Groonga log path in the <tt class="docutils literal"><span class="pre">http</span></tt>, <tt class="docutils literal"><span class="pre">server</span></tt> or <tt class="docutils literal"><span class="pre">location</span></tt> block. The default is <tt class="docutils literal"><span class="pre">/var/log/groonga/httpd/groonga.log</span></tt>. You can disable logging to specify <tt class="docutils literal"><span class="pre">off</span></tt>.</p> <p>Examples:</p> <div class="highlight-none"><div class="highlight"><pre>location /d/ { groonga on; # You can disable log for groonga. groonga_log_path off; } </pre></div> </div> </div> <div class="section" id="groonga-log-level"> <span id="id4"></span><h4>7.1.5.4.1.6. <tt class="docutils literal"><span class="pre">groonga_log_level</span></tt><a class="headerlink" href="#groonga-log-level" title="Permalink to this headline">¶</a></h4> <p>Synopsis:</p> <div class="highlight-none"><div class="highlight"><pre>groonga_log_level none | emergency | alert | ciritical | error | warning | notice | info | debug | dump; </pre></div> </div> <dl class="docutils"> <dt>Default</dt> <dd><tt class="docutils literal"><span class="pre">notice</span></tt></dd> <dt>Context</dt> <dd><tt class="docutils literal"><span class="pre">http</span></tt>, <tt class="docutils literal"><span class="pre">server</span></tt>, <tt class="docutils literal"><span class="pre">location</span></tt></dd> </dl> <p>Specifies Groonga log level in the <tt class="docutils literal"><span class="pre">http</span></tt>, <tt class="docutils literal"><span class="pre">server</span></tt> or <tt class="docutils literal"><span class="pre">location</span></tt> block. The default is <tt class="docutils literal"><span class="pre">notice</span></tt>. You can disable logging by specifying <tt class="docutils literal"><span class="pre">none</span></tt> as log level.</p> <p>Examples:</p> <div class="highlight-none"><div class="highlight"><pre>location /d/ { groonga on; # You can customize log level for groonga. groonga_log_level notice; } </pre></div> </div> </div> <div class="section" id="groonga-query-log-path"> <span id="id5"></span><h4>7.1.5.4.1.7. <tt class="docutils literal"><span class="pre">groonga_query_log_path</span></tt><a class="headerlink" href="#groonga-query-log-path" title="Permalink to this headline">¶</a></h4> <p>Synopsis:</p> <div class="highlight-none"><div class="highlight"><pre>groonga_query_log_path path | off; </pre></div> </div> <dl class="docutils"> <dt>Default</dt> <dd><tt class="docutils literal"><span class="pre">/var/log/groonga/httpd/groonga-query.log</span></tt></dd> <dt>Context</dt> <dd><tt class="docutils literal"><span class="pre">http</span></tt>, <tt class="docutils literal"><span class="pre">server</span></tt>, <tt class="docutils literal"><span class="pre">location</span></tt></dd> </dl> <p>Specifies Groonga's query log path in the <tt class="docutils literal"><span class="pre">http</span></tt>, <tt class="docutils literal"><span class="pre">server</span></tt> or <tt class="docutils literal"><span class="pre">location</span></tt> block. The default is <tt class="docutils literal"><span class="pre">/var/log/groonga/httpd/groonga-query.log</span></tt>. You can disable logging to specify <tt class="docutils literal"><span class="pre">off</span></tt>.</p> <p>Examples:</p> <div class="highlight-none"><div class="highlight"><pre>location /d/ { groonga on; # You can disable query log for groonga. groonga_query_log_path off; } </pre></div> </div> <p>Query log is useful for the following cases:</p> <blockquote> <div><ul class="simple"> <li>Detecting slow query.</li> <li>Debugging.</li> </ul> </div></blockquote> <p>You can analyze your query log by <a class="reference external" href="https://github.com/groonga/groonga-query-log">groonga-query-log package</a>. The package provides useful tools.</p> <p>For example, there is a tool that analyzing your query log. It can detect slow queries from your query log. There is a tool that replaying same queries in your query log. It can test the new Groonga before updating production environment.</p> </div> </div> <div class="section" id="performance-related-directives"> <h3>7.1.5.4.2. Performance related directives<a class="headerlink" href="#performance-related-directives" title="Permalink to this headline">¶</a></h3> <p>The following directives are related to the performance of groonga-httpd.</p> <div class="section" id="worker-processes"> <h4>7.1.5.4.2.1. <tt class="docutils literal"><span class="pre">worker_processes</span></tt><a class="headerlink" href="#worker-processes" title="Permalink to this headline">¶</a></h4> <p>For optimum performance, set this to be equal to the number of CPUs or cores. In many cases, Groonga queries may be CPU-intensive work, so to fully utilize multi-CPU/core systems, it's essential to set this accordingly.</p> <p>This isn't a groonga-httpd specific directive, but an nginx's one. For details, see <a class="reference external" href="http://wiki.nginx.org/CoreModule#worker_processes">http://wiki.nginx.org/CoreModule#worker_processes</a>.</p> <p>By default, this is set to 1. It is nginx's default.</p> </div> <div class="section" id="groonga-cache-limit"> <span id="id6"></span><h4>7.1.5.4.2.2. <tt class="docutils literal"><span class="pre">groonga_cache_limit</span></tt><a class="headerlink" href="#groonga-cache-limit" title="Permalink to this headline">¶</a></h4> <p>This directive is introduced to customize cache limit for each worker process.</p> <p>Synopsis:</p> <div class="highlight-none"><div class="highlight"><pre>groonga_cache_limit CACHE_LIMIT; </pre></div> </div> <dl class="docutils"> <dt>Default</dt> <dd>100</dd> <dt>Context</dt> <dd><tt class="docutils literal"><span class="pre">http</span></tt>, <tt class="docutils literal"><span class="pre">server</span></tt>, <tt class="docutils literal"><span class="pre">location</span></tt></dd> </dl> <p>Specifies Groonga's limit of query cache in the <tt class="docutils literal"><span class="pre">http</span></tt>, <tt class="docutils literal"><span class="pre">server</span></tt> or <tt class="docutils literal"><span class="pre">location</span></tt> block. The default value is 100. You can disable query cache to specify 0 to <tt class="docutils literal"><span class="pre">groonga_cache_limit</span></tt> explicitly.</p> <p>Examples:</p> <div class="highlight-none"><div class="highlight"><pre>location /d/ { groonga on; # You can customize query cache limit for groonga. groonga_cache_limit 100; } </pre></div> </div> </div> <div class="section" id="proxy-cache"> <h4>7.1.5.4.2.3. <tt class="docutils literal"><span class="pre">proxy_cache</span></tt><a class="headerlink" href="#proxy-cache" title="Permalink to this headline">¶</a></h4> <p>In short, you can use nginx's reverse proxy and cache mechanism instead of Groonga's built-in query cache feature.</p> <div class="section" id="query-cache"> <h5>7.1.5.4.2.3.1. Query cache<a class="headerlink" href="#query-cache" title="Permalink to this headline">¶</a></h5> <p>Groonga has query cache feature for <a class="reference internal" href="../commands/select.html"><em>select</em></a> command. The feature improves performance in many cases.</p> <p>Query cache feature works well on groonga-httpd except you use <a class="reference internal" href="../commands/cache_limit.html"><em>cache_limit</em></a> command on 2 or more workers. Normally, <a class="reference internal" href="../commands/cache_limit.html"><em>cache_limit</em></a> command isn't used. So there is no problem on many cases.</p> <p>Here is a description about a problem of using <a class="reference internal" href="../commands/cache_limit.html"><em>cache_limit</em></a> command on 2 or more workers.</p> <p>Groonga's query cache is available in the same process. It means that workers can't share the cache. If you don't change cache size, it isn't a big problem. If you want to change cache size by <a class="reference internal" href="../commands/cache_limit.html"><em>cache_limit</em></a> command, there is a problem.</p> <p>There is no portable ways to change cache size for all workers.</p> <p>For example, there are 3 workers:</p> <div class="highlight-none"><div class="highlight"><pre> +-- worker 1 client -- groonga-httpd (master) --+-- worker 2 +-- worker 3 </pre></div> </div> <p>The client requests <a class="reference internal" href="../commands/cache_limit.html"><em>cache_limit</em></a> command and the worker 1 receives it:</p> <div class="highlight-none"><div class="highlight"><pre> +-> worker 1 (changed!) client -> groonga-httpd (master) --+-- worker 2 +-- worker 3 </pre></div> </div> <p>The client requests <a class="reference internal" href="../commands/cache_limit.html"><em>cache_limit</em></a> command again and the worker 1 receives it again:</p> <div class="highlight-none"><div class="highlight"><pre> +-> worker 1 (changed again!!!) client -> groonga-httpd (master) --+-- worker 2 +-- worker 3 </pre></div> </div> <p>In this case, the worker 2 and the worker 3 aren't received any requests. So they don't change cache size.</p> <p>You can't choose a worker. So you can't change cache sizes of all workers by <a class="reference internal" href="../commands/cache_limit.html"><em>cache_limit</em></a> command.</p> </div> <div class="section" id="reverse-proxy-and-cache"> <h5>7.1.5.4.2.3.2. Reverse proxy and cache<a class="headerlink" href="#reverse-proxy-and-cache" title="Permalink to this headline">¶</a></h5> <p>You can use nginx's reverse proxy and cache feature for query cache:</p> <div class="highlight-none"><div class="highlight"><pre> +-- worker 1 client -- groonga-httpd (master) -- reverse proxy + cache --+-- worker 2 +-- worker 3 </pre></div> </div> <p>You can use the same cache configuration for all workers but you can't change cache configuration dynamically by HTTP.</p> <p>Here is a sample configuration:</p> <div class="highlight-none"><div class="highlight"><pre>... http { proxy_cache_path /var/cache/groonga-httpd levels=1:2 keys_zone=groonga:10m; proxy_cache_valid 10m; ... # Reverse proxy and cache server { listen 10041; ... # Only select command location /d/select { # Pass through groonga with cache proxy_cache groonga; proxy_pass http://localhost:20041; } location / { # Pass through groonga proxy_pass http://localhost:20041; } } # groonga server { location 20041; location /d/ { groonga on; groonga_database /var/lib/groonga/db/db; } } ... } </pre></div> </div> <p>See the following nginx documentations for parameter details:</p> <blockquote> <div><ul class="simple"> <li><a class="reference external" href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_path">http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_path</a></li> <li><a class="reference external" href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_valid">http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_valid</a></li> <li><a class="reference external" href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache">http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache</a></li> <li><a class="reference external" href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass">http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass</a></li> </ul> </div></blockquote> <p>Note that you need to remove cache files created by nginx by hand after you load new data to Groonga. For the above sample configuration, run the following command to remove cache files:</p> <div class="highlight-none"><div class="highlight"><pre>% groonga DB_PATH < load.grn % rm -rf /var/cache/groonga-httpd/* </pre></div> </div> <p>If you use Groonga's query cache feature, you don't need to expire cache by hand. It is done automatically.</p> </div> </div> </div> </div> <div class="section" id="available-nginx-modules"> <h2>7.1.5.5. Available nginx modules<a class="headerlink" href="#available-nginx-modules" title="Permalink to this headline">¶</a></h2> <p>All standard HTTP modules are available. HttpRewriteModule is disabled when you don't have PCRE (Perl Compatible Regular Expressions). For the list of standard HTTP modules, see <a class="reference external" href="http://wiki.nginx.org/Modules">http://wiki.nginx.org/Modules</a>.</p> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="../../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">7.1.5. groonga-httpd</a><ul> <li><a class="reference internal" href="#summary">7.1.5.1. Summary</a></li> <li><a class="reference internal" href="#synopsis">7.1.5.2. Synopsis</a></li> <li><a class="reference internal" href="#usage">7.1.5.3. Usage</a><ul> <li><a class="reference internal" href="#set-up">7.1.5.3.1. Set up</a></li> <li><a class="reference internal" href="#request-queries">7.1.5.3.2. Request queries</a></li> <li><a class="reference internal" href="#loading-data-by-post">7.1.5.3.3. Loading data by POST</a></li> <li><a class="reference internal" href="#browse-the-administration-tool">7.1.5.3.4. Browse the administration tool</a></li> <li><a class="reference internal" href="#shut-down">7.1.5.3.5. Shut down</a></li> </ul> </li> <li><a class="reference internal" href="#configuration-directives">7.1.5.4. Configuration directives</a><ul> <li><a class="reference internal" href="#groonga-httpd-specific-directives">7.1.5.4.1. Groonga-httpd specific directives</a><ul> <li><a class="reference internal" href="#groonga">7.1.5.4.1.1. <tt class="docutils literal"><span class="pre">groonga</span></tt></a></li> <li><a class="reference internal" href="#groonga-database">7.1.5.4.1.2. <tt class="docutils literal"><span class="pre">groonga_database</span></tt></a></li> <li><a class="reference internal" href="#groonga-database-auto-create">7.1.5.4.1.3. <tt class="docutils literal"><span class="pre">groonga_database_auto_create</span></tt></a></li> <li><a class="reference internal" href="#groonga-base-path">7.1.5.4.1.4. <tt class="docutils literal"><span class="pre">groonga_base_path</span></tt></a></li> <li><a class="reference internal" href="#groonga-log-path">7.1.5.4.1.5. <tt class="docutils literal"><span class="pre">groonga_log_path</span></tt></a></li> <li><a class="reference internal" href="#groonga-log-level">7.1.5.4.1.6. <tt class="docutils literal"><span class="pre">groonga_log_level</span></tt></a></li> <li><a class="reference internal" href="#groonga-query-log-path">7.1.5.4.1.7. <tt class="docutils literal"><span class="pre">groonga_query_log_path</span></tt></a></li> </ul> </li> <li><a class="reference internal" href="#performance-related-directives">7.1.5.4.2. Performance related directives</a><ul> <li><a class="reference internal" href="#worker-processes">7.1.5.4.2.1. <tt class="docutils literal"><span class="pre">worker_processes</span></tt></a></li> <li><a class="reference internal" href="#groonga-cache-limit">7.1.5.4.2.2. <tt class="docutils literal"><span class="pre">groonga_cache_limit</span></tt></a></li> <li><a class="reference internal" href="#proxy-cache">7.1.5.4.2.3. <tt class="docutils literal"><span class="pre">proxy_cache</span></tt></a><ul> <li><a class="reference internal" href="#query-cache">7.1.5.4.2.3.1. Query cache</a></li> <li><a class="reference internal" href="#reverse-proxy-and-cache">7.1.5.4.2.3.2. Reverse proxy and cache</a></li> </ul> </li> </ul> </li> </ul> </li> <li><a class="reference internal" href="#available-nginx-modules">7.1.5.5. Available nginx modules</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="groonga-benchmark.html" title="previous chapter">7.1.4. groonga-benchmark</a></p> <h4>Next topic</h4> <p class="topless"><a href="groonga-server-http.html" title="next chapter">7.1.6. groonga HTTPサーバー</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../../_sources/reference/executables/groonga-httpd.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="groonga-server-http.html" title="7.1.6. groonga HTTPサーバー" >next</a> |</li> <li class="right" > <a href="groonga-benchmark.html" title="7.1.4. groonga-benchmark" >previous</a> |</li> <li><a href="../../index.html">Groonga v5.0.1-42-g4d10df1 documentation</a> »</li> <li><a href="../../reference.html" >7. Reference manual</a> »</li> <li><a href="../executables.html" >7.1. Executables</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2015, Brazil, Inc. </div> </body> </html>