Hosted By

Contact Me

Misc Links

OpenNTF BlogSphere LotusGeek CoComment Custom Button

Ads by Google

Welcome to keithstric.com!

I hope you find this site useful in some way or another. I strive to bring you all sorts of geeky information and solutions to your most frustrating of issues with the occasional rant on whatever topic, technical reviews and weblog. You'll also find many products that I've developed and make available for you to use however you like. So, grab a cup of coffee, sit down and visit for a while.

Apache Front-End to Domino

04/08/2007 12:28 PM By Keith Strickland

Apache Front-End to Domino


Summary

This document was created because of a need to keep my current Photo Gallery available on my website and get rid of using Apache on another port in the backend just for the Gallery. What I've come up with is using Apache for all the web requests and Domino to run the Blog and Domino type applications. Also, I have recently been approached about hosting html only websites here on my new server and this setup would be optimal for this type of solution. Also, setting keithstric.com up in this manner makes it possible for me to run PHP applications to perform whatever functions and get rid of another open port. So, I think this setup has benefitted my website and also made available to the public another way of doing things.


Acknowledgements

Now, I know these usually come at the end of the document but I like to give credit where credit is due. So, here is the combination of documents I used to set all this up.
Requirements

  • A working server / glorified PC. OS is not dependent here as I used documents from sources explaining how to do this on Windows and Linux. I personally use Linux.
  • Apache installed and functioning and listening on port 80
  • Apache module mod_proxy configured
  • Apache module mod_rewrite configured
  • Apache module mod_proxy_http configured
  • Apache module mod_proxy_connect configured
  • Lotus Domino installed and functioning. HTTP should be running and listening on port 8080 (or whatever port you choose)

NOTE: This document does not cover the installation of these packages, only configuration.

Conventions used in this document

  • Words in Italics are commands to be typed at the command prompt
  • Words in bold italics are things that you will have to modify to match your setup / system
  • Words in the Courier New font represent a configuration file or some other file which needs to be modified on your server
  • This sequence of characters <--- represents a comment

Doing the configuration

OK, now you have Apache working on port 80, you can make sure of this by typing in your browser address bar http://www.yourdomain.com and you should get the index.html page or the default page from where you setup Apache. At the very least, you should get an Apache generated error.. You should also have Domino HTTP up and running and listening on port 8080 or whatever port you choose. So, assuming that these are now working as they should, lets get started.
Open the httpd.conf file up in your favorite text editor (for those of you using SuSE it will be located at /etc/apache2/httpd.conf) and look for the following lines and uncomment them:


LoadModule proxy_connect_module /usr/lib/apache2-prefork/mod_proxy_connect.so <--- Use the path to these files. This path is on a SuSE Linux 9.0 distro
LoadModule proxy_http_module /usr/lib/apache2-prefork/mod_proxy_http.so <--- Use the path to these files. This path is on a SuSE Linux 9.0 distro
LoadModule rewrite_module /usr/lib/apache2-prefork/mod_rewrite.so <--- Use the path to these files. This path is on a SuSE Linux 9.0 distro

If those lines are already uncommented then good, we're well on our way. Now add the following lines to httpd.conf. I just added them to the end of httpd.conf. This tells Apache that if the url contains .nsf to forward the request over to Domino.



ProxyRequests On


Order deny,allow
Deny from all
Allow from all



RewriteEngine on
RewriteRule /(.*).nsf(.*) http://localhost:8080/$1.nsf$2 [P]
RewriteRule /(.*).box(.*) http://localhost:8080/$1.box$2 [P] <--- This is for mail.box, put it in or leave it out, your choice

OK, now that we've got Apache forwarding requests over to Domino we need to tell Apache what to do with URLs being sent back from Domino during / after authentication as Domino sends the port number back in the URL. We don't want this so we'll need to add the following lines to httpd.conf. Also, if you are not forwarding port 8080 on your router this will return a 404 error. Now, if you hit refresh or remove the :8080 from the URL you will get to the page and you will be logged in. You may opt to add more paths here for each directory or DB in the data path for Domino which you personally use. But these are some I feel is necessary to get things working properly.


ProxyPass /mail/ http://localhost:8080/mail/
ProxyPassReverse /mail/ http://localhost:8080/mail/
ProxyPass /icons/ http://localhost:8080/icons/
ProxyPassReverse /icons/ http://localhost:8080/icons/
ProxyPass /names.nsf http://localhost:8080/names.nsf
ProxyPassReverse /names.nsf http://localhost:8080/names.nsf

Also, in order for Action Bar java applets and outline applets and also probably view applets to work properly we need to define a path to the Domino Java directory. So also add these lines to the httpd.conf file.


Alias /domjava/ "/local/notesdata/domino/java/" <-- This will be the path to the notes datadir java directory on your server
/local/notesdata/domino/java"><--- of course this will be the path to the notes datadir java directory on your server
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all


OK, and that's it for Apache. Now save httpd.conf and restart Apache. We can now test the configuration by opening a browser and typing in the address bar "http://www.yourdomain.com/homepage.nsf" and you should be greeted with the Domino default Home Page. You can also go to a database that will make you login and after authentication you should not see :8080 in the URL. If you do see :8080 in the URL then ensure that the DB or Folder that you have opened has a ProxyPass and ProxyPassReverse line in httpd.conf.


Special Thanks

Special thanks go out to my readers and everyone that visits and contributes time and articles to keithstric.com. If you have a how-to that you would like to post please just send me an e-mail. If I think it's relevant (i.e. Doing something with Linux, Lotus Notes / Domino, etc.) I will be glad to post it for you. I would also like to thank my wonderful Wife and family who put up with me sitting here working on things for hours on end.

Post A Comment

:-D:-o:-p:-(:-):-\:-|:angry::cool::cry::dontknow::emb::hairout::laugh::rolleyes::whew:;-)

Subscribe to keithstric.com

OpenNTF

Disclaimer

The opinions and ideas posted on keithstric.com are not necessarily the opinions and ideas of my employer. The solutions, techniques and code provided here are not guaranteed or warranted in any way and are free for you to use at your own risk.