@ Apache Configuration
- The problem:
I wanted a way to access my CIS server through a virtual host
(http://xq.aromatic.org/)
instead of a separate port on my server
(http://www.aromatic.org:8000/)
I also wanted an easy way to "view" my .xqy pages as text instead of
rendering them.
- The solution:
Use the Apache module
mod_proxy
configured to forward requests to CIS (using the
ProxyPass
directive.
- Explanation:
As you can see below I put my directives in a VirtualHost
section.
The first ProxyPass instructs mod_proxy to ignore
every request that starts with /src (the ! stands for
not!).
The second ProxyPass instructs mod_proxy to forward
every other request to my CIS server (on port 8000).
After that I have an Alias directive to map all the requests
for /src/* to a different document root (the root of my
CIS server documents).
The Directory section set some options for the CIS documents
folder.
- Notes:
As I explained before I added the /src mapping so that
I could see the content of an .xqy page without rendering
it through CIS (like here:
http://xq.aromatic.org/src/apache.xqy)
Well, I can do the same for Apache and, for example, have CIS show
the content of a .php page that would otherwise be rendered
by Apache/PHP (in this case the page, hosted under CIS, is rendered
by Apache when accessed as /src/* and simply displayed by CIS
when accessed as /*
#
# Apache configuration
#
<VirtualHost 192.168.5.2>
ServerName xq.aromatic.org
ProxyPass /src !
ProxyPass / http://localhost:8000/
Alias /src /opt/MarkCIS/aromatic
</VirtualHost>
<Directory /opt/MarkCIS/aromatic>
Options +Indexes +FollowSymLinks
</Directory>
Powered by
MarkLogic Server Standard edition ver. 3.2-1
Send comments or suggestions to
raff@aromatic.org