免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5001 | 回复: 5
打印 上一主题 下一主题

[Web] [原创]在unix上让apache支持asp [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2002-12-25 11:48 |只看该作者 |倒序浏览
在unix上让apache支持asp

作者:南非蜘蛛 zhedou@sohu.com
个人主页:http://douzhe.nease.net
转载请保留作者信息


在这里讨论这个问题,仅是为了研究,我个人认为,在unix上,让apache支持asp没有任何实际意义
如果以前是在win上开发的asp,我想你就让到在win上好好用吧,不用费劲的移植到unix上了

我是在solaris上测试的安装,其它系统,freebsd,linux和sco我想也差不多,忘大家测时候能反馈给我你的结果,谢谢
好了,让我们开始吧
下载相关软件
apache_1.3.27.tar       下载:http://www.apache.org/dist
Apache-ASP-2.49.tar     下载:http://cpan.org/modules/by-module/Apache/
mod_perl-1.27.tar       下载:http://perl.apache.org/download/index.html
stable.tar(perl-5.8.0)  下载:http://www.cpan.org/src/

把上面的软件下载到一个目录,如test
1:解压
#tar xvf apache_1.3.27.tar
#tar xvf Apache-ASP-2.49.tar
#tar xvf mod_perl-1.27.tar

2:安装apache
为了以DSO的方式安装mod_perl,所以要有so模块
#cd apache_1.3.27
#./configure --prefix=/usr/local/apache
#make
#make install
上面这样编译会有一些modules加不进来,我只好手动指定modules了,大家用下面的命令安装apache
#./configure --prefix=/usr/local/apache --enable-module=auth_anon --enable-module=auth_dbm --enable-module=autoindex -

-enable-module=cgi --enable-module=expires --enable-module=expires --enable-module=proxy --enable-module=rewrite -

-enable-module=so
#make
#make install
检查安装的模块
#cd /usr/local/apache/bin/httpd -l
Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_rewrite.c
  mod_access.c
  mod_auth.c
  mod_auth_anon.c
  mod_auth_dbm.c
  mod_proxy.c
  mod_expires.c
  mod_so.c
  mod_setenvif.c
suexec: disabled&#59; invalid wrapper /usr/local/apache/bin/suexe

3:安装mod_perl
% make -v
% gcc -v
% perl -v
安装perl
我得perl版本不够,所以我升级了一下perl的版本,现在是v5.8.0
下载http://www.cpan.org/src/stable.tar
#tar xvf stable.tar
#cd perl-5.8.0/
#make
#make install
到sunfreeware下载pkg的安装也可以,可能还更简单

#cd mod_perl-1.27
看看DSO编译的语法
#grep DSO Makefile.PL
照猫画虎
#perl Makefile.PL EVERYTHING=1 DO_HTTPD=1 USE_APACI=1 USE_DSO=1 USE_APXS=1 WITH_APXS=/usr/local/apache/bin/apxs
#make
#make install

测试mod_perl模块
启动apache
#telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
输入get Head /http /1.0
HTTP/1.1 400 Bad Request
Date: Wed, 25 Dec 2002 03:32:32 GMT
Server: Apache/1.3.27 (Unix) mod_perl/1.27

ok,mod_perl加上了


给perl安装asp模块,一张方法是CPAN安装,一种是常规安装
CPAN安装
#perl -MCPAN -e shell
cpan>; install CPAN
...
Installing the Apache::ASP bundle will automatically install all the modules
Apache::ASP is dependent on as well as Apache::ASP itself. If you have
trouble installing the bundle, then try installing the necessary modules one
at a time:
cpan>; install MLDBM
cpan>; install MLDBM::Sync
cpan>; install Digest::MD5
cpan>; install Apache::ASP

For extra/optional functionality in Apache::ASP 2.31 or greater, like
support for FormFill, XSLT, or SSI, you can install this bundle via CPAN:
cpan>; install Bundle::Apache::ASP::Extra

也可以用常规的方法安装asp模块
Otherwise, just copy ASP.pm to
$PERLLIB/site/Apache
>; perl Makefile.PL
>; make
>; make test
>; make install

安装完毕,进行测试
在htdocs里vi一个test.asp,内容如下

<!-- sample here -->;
<html>;
<body>;
For loop incrementing font size: <p>;
<% for(1..5) { %>;
<!-- iterated html text -->;
<font size=&quot;<%=$_%>;&quot; >; Size = <%=$_%>; </font>; <br>;
<% } %>;
</body>;
</html>;
<!-- end sample here -->;

http://202.106.185.101/test.asp
大家可以到这里看看效果

good luck!

参考文档
http://www.apache-asp.org/install.html
http://cpan.org/modules/by-module/Apache/Apache-ASP-2.49.readme
http://perl.apache.org/docs/1.0/guide/getwet.html#Installing_mod_perl
http://www.freelamp.com/new/publish/1015481268/index_html

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2002-12-25 11:55 |只看该作者

[原创]在unix上让apache支持asp

   SAVE!
   蜘蛛,为什么看这些东西了?是不是你们公司想淘汰WIN的系统了?

论坛徽章:
0
3 [报告]
发表于 2002-12-25 12:01 |只看该作者

[原创]在unix上让apache支持asp

下面引用由peng2002/12/25 11:55am 发表的内容:
SAVE!
   蜘蛛,为什么看这些东西了?是不是你们公司想淘汰WIN的系统了?
研究而已,个人兴趣

论坛徽章:
0
4 [报告]
发表于 2003-04-02 00:43 |只看该作者

[原创]在unix上让apache支持asp

I have tried.  But it does not work.

+++++++++++++++++++++++++++++++
telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
get head /http /1.0
HTTP/1.1 400 Bad Request
Date: Tue, 01 Apr 2003 16:36:22 GMT
Server: Apache/1.3.27 (Unix) mod_jk/1.2.1 mod_perl/1.27 PHP/4.0.6 mod_ssl/2.8.12 OpenSSL/0.9.6g
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">;
<HTML>;<HEAD>;
<TITLE>;400 Bad Request</TITLE>;
</HEAD>;<BODY>;
<H1>;Bad Request</H1>;
Your browser sent a request that this server could not understand.<>;
The request line contained invalid characters following the protocol string.<>;
<>;
<HR>;
<ADDRESS>;Apache/1.3.27 Server at www.jdh-group.biz Port 80</ADDRESS>;
</BODY>;</HTML>;
Connection closed by foreign host.
+++++++++++++++++++++++++++++++++++++++++++

from above yo can see that mod_perl is indeed OK.

however, http://62.49.153.22/index.asp

seam not work properly.

论坛徽章:
0
5 [报告]
发表于 2003-06-23 16:46 |只看该作者

[原创]在unix上让apache支持asp

大家可以试一下 Macromedia ColdFusion MX for Linux ,她也支持ASP,JSP,PHP,CGI等

论坛徽章:
0
6 [报告]
发表于 2003-11-07 19:26 |只看该作者

[原创]在unix上让apache支持asp

那怎么创建ado对象访问数据库呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP