On 27 Oct 2011, at 15:56, Charles wrote:
> Sorry if this question is na?ve and confused; I'm new to Apache
> configuration.
We're not apache experts by any means, so you'll almost certainly be
better off asking in a dedicated forum.
> Can Apache be configured to run omega via a file in the conf.d directory
> rather than a virtual server?
Yes, and probably in a number of different ways.
> I have been using a virtual server on port 80 but now need to run nagios
> on port 80 too and do not want to ask the users to start using a URL
> with a non-standard port for omega. KISS.
If you mean /search is omega and /nagios is nagios, then you can still do this
within a virtual host. (I'm confused by what you say in general here, and
this is exactly the situation virtual hosts are designed to support: multiple
websites with different hostnames served from the same machine on the same
port.)
> AFAIK omega gives the user links to files under DocumentRoot. That was
> not an issue when using a virtual server which could have its own
> DocumentRoot.
Omega returns URLs that are based on the configuration and way you run omindex.
It's intended to provide searchable access to a website that's (largely)
served statically, such as by apache using a DocumentRoot, but if you make use
of aliases omindex can support that as well. One way in this particular case
would be to Alias /docs to somewhere, and re-index with those as the base URL
and WEBPATH respectively to omindex:
omindex --db DBPATH --url /docs PATH-TO-DOCS-ON-DISK
(as at the top of http://xapian.org/docs/omega/quickstart.html)
> For a conf.d file the equivalent would be an Alias directive but
> aliasing / would not be sane. Is there any way to tell omega to look
> for the files somewhere else?
Omega doesn't 'look' for the files anywhere, it just constructs
URLs. So you need to configure the web server to serve them from somewhere.
> Here's the attempt at a conf.d file:
>
> Redirect "/search"
"/cgi-bin/omega/omega?DB=docoll&FMT=docoll"
> ScriptAlias "/cgi-bin/omega" "/etc/opt/docoll/live"
> <DirectoryMatch /etc/opt/docoll/live>
> Alias "/" "/srv/docoll"
> <Directory "/srv/docoll">
> AllowOverride None
> Options All
> Order Allow,Deny
> Allow from all
> </Directory>
> ServerAdmin <email address>
> ServerName "Document Collation"
> </DirectoryMatch>
>
> Apache says "Alias not allowed here".
Yes, Alias is only allowed in server config & virtual hosts
(http://httpd.apache.org/docs/1.3/mod/mod_alias.html#alias). I strongly
recommend you seek apache-specific help here to achieve what you need to do.
J
--
James Aylett
talktorex.co.uk - xapian.org - devfort.com - spacelog.org