首页 | 邮件资讯 | 技术教程 | 解决方案 | 产品评测 | 邮件人才 | 邮件博客 | 邮件系统论坛 | 软件下载 | 邮件周刊 | 热点专题 | 工具
网络技术 | 操作系统 | 邮件系统 | 客户端 | 电子邮箱 | 反垃圾邮件 | 邮件安全 | 邮件营销 | 移动电邮 | 邮件软件下载 | 电子书下载

邮件服务器

技术前沿 | Qmail | IMail | MDaemon | Exchange | Domino | 其它 | Foxmail | James | Kerio | JavaMail | WinMail | Sendmail | Postfix | Winwebmail | Merak | CMailServer | 邮件与开发 | 金笛 |
首页 > 邮件服务器 > Lotus Domino > Domino 与 Apache PHP 的集成 > 正文

Domino 与 Apache PHP 的集成

出处:csdn 作者:snowdot23 时间:2005-8-15 15:37:00

现在很多项目是php开发,php作为流行的开发语言,具有良好的性能
这篇文章就是介绍如何使domino与php集成在一起

Introduction

People often ask whether it's possible to use PHP with Domino. It's not as long as Domino is the HTTP stack being used. In theory it would be possible with IIS as the HTTP stack and the PHP module for IIS, but this is a nicer solution (because you don't need IIS) using Apache as the HTTP stack.

This is achieved without any additional code or modules, just through proper configuration of Apache. In essence, we're using mod_rewrite to find URLs with .nsf in them and pass them through to mod_proxy to fetch them from Domino. This in effect gives you seamless integration between Apache and Domino, as content on an Apache server usually won't have .nsf in the filename so there won't be a conflict.

System Requirements

Here is the software and versions I used to test this out:

  • Domino 5.06a (This was the first Domino CD I found in my drawer)
  • Apache 1.3.22 (Should work with any 1.3 version of Apache - might be different under 2.0)
  • PHP 4.2.0

Note: For these examples I'm assuming you're running Apache and Domino on the same box, although there's nothing stopping you from running them seperately - just replace relevant references to "localhost" with the hostname of your Domino server.

Setting up Domino

Note: You can skip this step if you're running Apache and Domino on seperate boxes.

Firstly we need to move Domino off port 80 for HTTP, so that Apache can take over port 80. To do this in the Server Document go to:

Ports -> Internet Ports -> Web
Change TCP/IP Port Number to any value but 80, for example 81. The rest of this page will assume you're going to be running Domino on port 81.

Restart the HTTP task - it should come back up on port 81. Try to get to it through the browser, go to the URL http://localhost:81/ - you should get whatever you have setup as the homepage.

Setting up Apache / PHP

Note that the basic setup of Apache / PHP is not going to be discussed here. We will assume you have installed Apache, set it up (running on port 80 as normal), installed PHP and setup Apache so that it can run PHP pages. (Phew!) Sounds more complicated than it is, if you've never done it before. If you follow the Apache Install instructions and the PHP Install instructions you shouldn't have any trouble.

Add the following lines to your httpd.conf:

        <IfModule mod_rewrite.c>
            RewriteEngine on
            RewriteRule ^(.*).nsf(.*) http://localhost:81$1.nsf$2 [P]
        </IfModule>
    

What this does is rewrite any URL with a .nsf in it to an Apache proxy request for the same page on port 81 (where Domino is running)

Also add the following lines to ensure that mod_proxy is setup: Note: There will likely be a commented out mod_proxy section if you're using the default httpd.conf - you can just edit that one if you like

        <IfModule mod_proxy.c>
            ProxyRequests On

            <Directory proxy:*>
                Order deny,allow
                Deny from all
                Allow from 127.0.0.1
            </Directory>
        </IfModule>
    

This will make sure that Proxying is on and only the locally running Apache server is allowed to make Proxy requests.

Update 26 April 2002: I forgot to originally mention that you'll also need to make sure that the proxy module is being loaded - Near the top of the httpd.conf file there are two lines that need to be uncommented (they're in seperate sections):

		LoadModule proxy_module modules/mod_proxy.so
		
		AddModule mod_proxy.c
	

Start Apache and go to http://localhost/homepage.nsf and you should get the Domino sample homepage being served through Apache.

Using PHP with Domino

Accessing Domino servers using PHPs support for COM on the Windows platform is nothing unique, so I won't go into too much detail. One interesting thing though when integrating PHP with Domino is you can use PHP for displaying stuff, and then jump to a Domino generated page anytime you need to seamlessly. This is mainly what this example is about - it's a simple example to display a list of names in the NAB and let you edit the records. The display is done using PHP and the editing is standard Domino EditDocument functionality. I used the NAB as the example because I tried this integration stuff on a standalone server and I didn't have any other interesting databases on it :)

Download nab.zip - ZIP file containing the nab.php file.

Limitations, TODO, etc

I haven't done too much experimenting with this integration, just mainly wanted to see if it works. It doesn't seem like there are any real limitations. One thing that might have been an issue that isn't is that authentication works. Note that if you're using files that are in the domino\html directory you will need to either move them into the Apache htdocs directory or point Apache's root to the Domino domino\html directory.

Also it'd be interesting to see what performance is like under "real" loads. I wouldn't think the proxying would add too much overhead. If anyone has easy access to some stress testing tools and gives it a go, let me know and I'll share with everyone.

Some things to consider and/or try:

  • SSL connections - how will this work given you'll need seperate certificates for Domino and Apache? I think what would work is that you have the proper certificate for the Apache server and a self-signed cert for Domino - that way when the Apache proxy requests the Domino page it doesn't matter that the certificate is self-signed because it will be Apache actually returning the page to the user (ie. seamlessly)
  • Setting up Domino so that it only accepts connections from Apache - this would prevent someone going to port 81 and getting around Apache. If it's behind a firewall this won't be an issue.
  • Using mod_rewrite to make pretty URLs for Domino content ala the functionality in Domino 6
  • You can play around with the mod_proxy settings to enable caching for Domino pages. Check out the manual page for mod_proxy for more info.
,
相关文章 热门文章
  • 实现微软AD与Domino OA系统的互连互用
  • IBM Lotus Domino iCalendar邮件地址解析栈溢出漏洞
  • 现有 IBM Lotus Domino/Notes 邮件模板简介
  • IBM Lotus Domino 8.5 服务器管理入门手册
  • IBM Lotus Domino LDAP请求远程堆溢出漏洞
  • IBM Lotus Domino readme.nsf页面远程跨站脚本漏洞
  • 基于Lotus Domino的OA系统中安全机制的研究
  • Lotus Domino HTTP server 漏洞
  • Lotus Domino 8.5 ID Vault 新功能介绍及体验
  • 理解 IBM Lotus Domino 服务器集群
  • Domino R5用Lotus Script处理XML
  • Lotus Domino与关系数据库的互操作
  • Domino管理员29个问题
  • Lotus Domino/Notes如何有效防止垃圾邮件
  • 配置Domino服务器
  • Lotus Notes常见问题答疑
  • Lotus Notes安装和使用的常见问题
  • Lotus Notes 的最终用户最需知道的十件事
  • 如何提高Domino服务器性能
  • LOTUS NOTES .INI文件参数设置秘籍
  • Domino 做Internet企业邮局的配置
  • Domino SMTP邮件服务器设置实例
  • 基于Linux平台的Domino Server安装与配置
  • 如何配制Domino for IIS?
  • 自由广告区
     
    最新软件下载
  • SharePoint Server 2010 部署文档
  • Exchange 2010 RTM升级至SP1 教程
  • Exchange 2010 OWA下RBAC实现的组功能...
  • Lync Server 2010 Standard Edition 标..
  • Lync Server 2010 Enterprise Edition...
  • Forefront Endpoint Protection 2010 ...
  • Lync Server 2010 Edge 服务器部署文档
  • 《Exchange 2003专家指南》
  • Mastering Hyper-V Deployment
  • Windows Server 2008 R2 Hyper-V
  • Microsoft Lync Server 2010 Unleashed
  • Windows Server 2008 R2 Unleashed
  • 今日邮件技术文章
  • 腾讯,在创新中演绎互联网“进化论”
  • 华科人 张小龙 (中国第二代程序员 QQ...
  • 微软推出新功能 提高Hotmail密码安全性
  • 快压技巧分享:秒传邮件超大附件
  • 不容忽视的邮件营销数据分析过程中的算..
  • 国内手机邮箱的现状与未来发展——访尚..
  • 易观数据:2011Q2中国手机邮箱市场收入..
  • 穿越时空的爱恋 QQ邮箱音视频及贺卡邮件
  • Hotmail新功能:“我的朋友可能被黑了”
  • 入侵邻居网络发骚扰邮件 美国男子被重..
  • 网易邮箱莫子睿:《非你莫属》招聘多过..
  • 中国电信推广189邮箱绿色账单
  • 最新专题
  • 鸟哥的Linux私房菜之Mail服务器
  • Exchange Server 2010技术专题
  • Windows 7 技术专题
  • Sendmail 邮件系统配置
  • 组建Exchange 2003邮件系统
  • Windows Server 2008 专题
  • ORF 反垃圾邮件系统
  • Exchange Server 2007 专题
  • ISA Server 2006 教程专题
  • Windows Vista 技术专题
  • “黑莓”(BlackBerry)专题
  • Apache James 专题
  • 分类导航
    邮件新闻资讯:
    IT业界 | 邮件服务器 | 邮件趣闻 | 移动电邮
    电子邮箱 | 反垃圾邮件|邮件客户端|网络安全
    行业数据 | 邮件人物 | 网站公告 | 行业法规
    网络技术:
    邮件原理 | 网络协议 | 网络管理 | 传输介质
    线路接入 | 路由接口 | 邮件存储 | 华为3Com
    CISCO技术 | 网络与服务器硬件
    操作系统:
    Windows 9X | Linux&Uinx | Windows NT
    Windows Vista | FreeBSD | 其它操作系统
    邮件服务器:
    程序与开发 | Exchange | Qmail | Postfix
    Sendmail | MDaemon | Domino | Foxmail
    KerioMail | JavaMail | Winwebmail |James
    Merak&VisNetic | CMailServer | WinMail
    金笛邮件系统 | 其它 |
    反垃圾邮件:
    综述| 客户端反垃圾邮件|服务器端反垃圾邮件
    邮件客户端软件:
    Outlook | Foxmail | DreamMail| KooMail
    The bat | 雷鸟 | Eudora |Becky! |Pegasus
    IncrediMail |其它
    电子邮箱: 个人邮箱 | 企业邮箱 |Gmail
    移动电子邮件:服务器 | 客户端 | 技术前沿
    邮件网络安全:
    软件漏洞 | 安全知识 | 病毒公告 |防火墙
    攻防技术 | 病毒查杀| ISA | 数字签名
    邮件营销:
    Email营销 | 网络营销 | 营销技巧 |营销案例
    邮件人才:招聘 | 职场 | 培训 | 指南 | 职场
    解决方案:
    邮件系统|反垃圾邮件 |安全 |移动电邮 |招标
    产品评测:
    邮件系统 |反垃圾邮件 |邮箱 |安全 |客户端
    广告联系 | 合作联系 | 关于我们 | 联系我们 | 繁體中文
    版权所有:邮件技术资讯网©2003-2010 www.5dmail.net, All Rights Reserved
    www.5Dmail.net Web Team   粤ICP备05009143号