首先先到http://httpd.apache.org 下載Apache 2.2.15
下載的連結是httpd-2.2.15-win32-x86-openssl-0.9.8m-r2.msi

Configuring Apache web server in Windows
在Windows 底下設置Apache web server 使其能執行cfml.
你可以利用GUI 界面的Web Server Configuration tools 或是使用命令列模式.
You configure Apache by using the Web Server Configuration Tool in GUI or command-line mode. This discussion describes how to use GUI mode.

底下的討論將描述如何使用GUI 模式.

(Server configuration only) To use the command line, open the batch files located in cf_root\bin\connectors.

For more information, see the Web Server Management topic in the Configuring and Administering ColdFusion guide.
Configure Apache for ColdFusion in Windows

1.
Start the Web Server Configuration Tool by selecting Start > Programs > Adobe > ColdFusion 9 > Web Server Configuration Tool.

2.
Click Add.

3.
In the Server pop-up menu, select the host name and the server or cluster name to configure. For the ColdFusion server configuration, this is always coldfusion. Clustering support is not available on the server configuration.
Note: The server or cluster does not have to reside on the web server computer.
在這個Server pop-up menu 這兒.host name and server name 若是採用ColdFusion就選coldfusion,
若要採用Railo (另一個開放原始程式碼的CFML 引擎)就選擇它. 但記得要去JRUN4 去啟動它

4.
In the Web Server Properties area, select Apache and specify the path to the directory that contains the httpd.conf file.
若安裝Apache 2.2.15 是採預設值安裝.那http.conf這個檔案就會在"C:\Program Files\Apache Software Foundation\Apache2.2\conf" (請自行將""去掉)

5.
Select the Configure web server for ColdFusion applications option, and click OK.
Note: Omitting the previous step causes your web server to serve ColdFusion source code.

6.
若依安裝預設值,你可以從C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war複制到Apache htdocs目錄下
Copy the CFIDE and cfdocs directories from cf_root/wwwroot to your web server root directory. Also, copy your application’s CFM pages from cf_root/wwwroot to your web server root directory. In the multiserver configuration, these files are under the jrun_root/servers/cfusion/cfusion-ear/cfusion-war directory.

Verify your Apache configuration

1.

Verify that one of the following files was created:
*

cf_root\runtime\lib\wsconfig\number\mod_jrun.so (Apache 1.3.2.7)
*

cf_root\runtime\lib\wsconfig\number\mod_jrun20.so (Apache 2.x)

In the multiserver configuration, this file is located under jrun_root/lib/wsconfig.
若是採用Multiserver 組態的話.這檔案可在C:\JRun4\lib\wsconfig\1 找到mod_jrun22.so
2.

Open the Apache configuration file, httpd.conf, in your Apache conf directory. In Windows, the default is C:\Program Files\Apache Group\Apache\conf\httpd.conf.

3.

Verify that the following code is appended to this file (except that if you are using Apache 2.2, the filename is mod_jrun22.so):
檢查底下的組態設定是否相符.建議使用PSPAd 或是NotePad++ 來開啟,一般在使用Web Server Configuration Tool 並勾選了Configure web server for ColdFusion applications option.它是會自動幫
你修改Apache http.conf 組態檔的
# JRun Settings
LoadModule jrun_module "c:/ColdFusion9/runtime/lib/wsconfig/1/mod_jrun.so"

JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig IgnoreSuffixmap false
JRunConfig Serverstore "c:/ColdFusion9/runtime/lib/wsconfig/1/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51000
#JRunConfig Errorurl
JRunConfig jrun-handler .jsp .jws .cfm .cfml .cfc .cfswf .cfr


完成以上的步驟後.就是要測試CFM是否能在Apache 正確開啟.
index.cfm


Server Dump

Copyright 2010 Yita電腦調校日誌
Lunax Free Premium Blogger™ template by Introblogger