现在很多项目是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 -> WebChange

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:

RewriteEngine on

RewriteRule ^(.*).nsf(.*) http://localhost:81$1.nsf$2 [P]

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

ProxyRequests On

Order deny,allow

Deny from all

Allow from 127.0.0.1

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.

下来的的问题就是:如何SSO(单一登陆),在domino和php集成环境下

php domino,Domino 与 Apache PHP 的集成相关推荐

  1. php domino,domino 与 apache php 的集成_lotus notes

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

  2. php domino,月光软件站 - 编程文档 - 其他语言 - Domino 与 Apache PHP 的集成

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

  3. apache camel_REST端点,可使用Apache Camel进行集成

    apache camel REST是一种用于组织资源的体系结构样式,当应用于基于HTTP的服务时,REST可以构建无状态,分离的可伸缩服务. HTTP方法,HTTP标头和mime类型都允许开发人员实现 ...

  4. REST端点,可使用Apache Camel进行集成

    REST是一种用于组织资源的体系结构样式,当应用于基于HTTP的服务时,REST可以构建无状态的,解耦的,可伸缩的服务. HTTP方法,HTTP标头和mime类型都允许开发人员实现REST样式. 诸如 ...

  5. Spring Boot 和Apache Kafka的集成

    点击上方蓝色"方志朋",选择"设为星标" 回复"666"获取独家整理的学习资料! 1. 引言 Apache Kafka 是一个分布式的.容错 ...

  6. linux trac apache,Ubuntu下集成Apache+Trac+Git

    ps:没有一边操作一边记录,可能有个别地方权限设置有点问题请注意 软件安装 安装Python setuptoolssudo apt-get install python-setuptools 安装ea ...

  7. Redmine、Apache、Git集成遇到的重重困难

    Remine.Apache和Git这个三个软件,无论哪一个,单独说来安装.配置和使用都是非常方便的,可是想把它们结合起来,却不是那么容易的事情.这里就把这一周来遇到的种种问题记录下来. 一.Redmi ...

  8. Flink从入门到精通100篇(二十一)-Apache Flink 与 Apache Hive 的集成

    前言 随着 Flink 在流式计算的应用场景逐渐成熟和流行.如果 Flink 能同时把批量计算的应用场景处理好,就能减少用户在使用 Flink 的开发和维护成本,并且能够丰富 Flink 的生态.因为 ...

  9. 性能提升约 7 倍!Apache Flink 与 Apache Hive 的集成

    导读:随着 Flink 在流式计算的应用场景逐渐成熟和流行,如果 Flink 能同时把批量计算的应用场景处理好,就能减少用户在使用 Flink 时开发和维护的成本,并且能够丰富 Flink 的生态.S ...

最新文章

  1. 使用Maven打包你的应用——maven-jar-plugin maven-assembly-plugin maven-shade-plugin
  2. Go 1.5正式发布:实现自举、引入并发垃圾收集器
  3. response.sendRedirect()重新定向的乱码问题
  4. local_irq_disable
  5. 2- 计算机的组成,VMware使用
  6. Windows上Tomcat启动,服务中没有Tomcat
  7. 盘点十个最伟大的公式,1+1=2仅排到了第七
  8. P4092-[HEOI2016/TJOI2016]树【线段树,倍增】
  9. wordpress后台外观没有菜单和小工具的解决方法
  10. 手把手教你用C语言画“心”!
  11. 配置suse syslog服务器
  12. RHEL7和RHEL6的主要变化
  13. 关于表数据同步使用update_time时的注意事项
  14. steam社区、好友列表无法打开问题通解
  15. rufus中gpt和mrb磁盘_SSD固态硬盘用GPT还是MBR分区?
  16. 解读《大话西游之大圣娶亲》
  17. 疯狂游戏-研发一面-校招面经
  18. 所爱隔山海,山海皆可平
  19. python xlsx转xls_Python 批量将xls文件转换为xlsx
  20. 小程序替换二维码logo并添加文字

热门文章

  1. matlab画等势线的程序,求助大牛MATLAB画三维等势面
  2. 一个95后开发者关于消息发送的实践
  3. 人力资源管理系统(eHR)有何作用?
  4. APISpace 星座配对API
  5. 基于单片机的消毒灯系统
  6. 太阳能电池系统的选型与设计
  7. [modem]AP和BP简介
  8. Salesforce CRM系统排名?Salesforce CRM办公系统怎么选?什么是用户口碑最好的Salesforce CRM系统?
  9. mysql 字段集合运算_如何用SQL进行集合运算
  10. CSS权威指南重点要点摘录