logo

Domino & Apache?

One of things I remember hearing mentioned at Lotusphere was that the Apache web server was to be included with Domino 7. This got me quite excited. Well, I've just done some searching and found that, like most Notes developments, it's nothing to get excited about. All they are including is the Apache AXIS Web Services tool. Exciting in itself but why don't they go the whole hog and let us use Apache?

Have I got it wrong? Maybe you can use Apache with Domino. I know there are ways of configuring Apache to forward .nsf requests to Domino, which is running on a different port number. I've talked about this before. What I also found back then was that it all went wrong when Domino returned URLs to the browser and inserted the port number in to the URL, thus taking control back from Apache. My understanding was that Domino 7 might eliminate this. Oh well...

The reason it's back in my mind is that I'm playing with LAMP again. As ever, I am constantly learning new things and even learning new approaches to others. Last week I discovered a better way to create user-friendly URLs. Consider the following URLs:

All three URLs are handled by one PHP file called index.php. The reason this works is that Apache can pattern-match incoming URLs and point them to the right place. Here are the rules needed. All you need to do is place them in a text file called .htaccess and place it in the folder your web server.

RewriteEngine on
RewriteBase /gallery/
RewriteRule ^archive/([0-9]+).html$ index.php?photo=$1
RewriteRule ^archive/(.*)/(.*)/$ index.php?year=$1&month=$2

And, to prove the point, here's the URLs of the real locations:

It would be great to be able to do this in Domino 7. No more ugly URLs.

Comments

  1. What a coincidence...I just started learning mod_rewrite the other day (not by choice!). It can be a bear, but it's very powerful once you learn the basics. I had to tweak the Apache config file a bit to get it to work, so it may not be as simple as just creating a .htaccess file in everyone's case.

  2. Hey Jake,

    I was reading through the Tomcat configuration example that ships with Tomcat this past weekend. There is something called the JK2 connector, written in java, based on an appache.org object, that allows Tomcat to connect to Apache and vice-versa. It appears to be a pretty well established standard connector topology. Seems like any diligent java programmer with some Apache experience could make one that works from any existing domino server with a JVM running.... I'd be curious to know if it were possible. Certainly seems so.

    • avatar
    • YoGi
    • Wed 25 Feb 2004 11:12

    It works with Tomcat because it uses connectors. You can't use a connector (coyote, jk2 or other) with something else than Tomcat.

  3. You can to some extent do this with Substitution Rules in Domino 6. For example I have rules similar to:

    /*/*.html => /*.nsf/docs/*

    It's not as flexible as mod_rewrite, for example you can't re-order parameters or use regexps to filter input, but it seems to work okay. Hmm.. maybe an idea for a DSAPI filter plugin.. :)

  4. There is the "Domino Tomcat Redirector" {Link} that allows Domino to use Tomcat as it's servlet/JSP server.

    Re: nice URLs, the website I look after at {Link} is a domino one and has loverly URLs. All done with URL substitution rules in Domino.

    I'm a big fan of readable URLs and hate teh standard Domino ones. The webspere portal server URLs are an abomination!!!!

    • avatar
    • Heini
    • Thu 26 Feb 2004 10:06

    Just for clarification. Apache was already promised for Domino 6. The statement was made while the Garnet story upset many by Mr. Arthur Fontaine.

    {Link}

    At the end both were gone without further notification. I still have hope for Domino 7 though.

    Have a nice day.

    Heini

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Wed 25 Feb 2004

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content