setup Perl&Apache on windows xp

Download Download the All-in-One package at:http://www.apache.org/dyn/closer.cgi/perl/win32-bin/This package contains Perl and Apache binaries. so you don't need to...

Download 

Download the All-in-One package at:

This package contains Perl and Apache binaries. so you don't need to download Apache additionally.

The downloaded file name is Perl-5.8-win32-bin-0.10.exe

Installation & configuration

Run this installation file, choose a directory where would be installed, if you want the files to be in C:\Perl\, just Enter C:\ . I installed at D:\Green\

All files would be copied into D:\Green\Perl and D:\Green\Apache2

After the installation, the application will ask you if start to configure the Apache and Perl. just need to follow the indication of the text based configuration wizard.

If configure is succeed with no error then go to next step.

Add these 2 paths where are your Perl and Apache installed into your OS environment variable PATH:

D:\Green\Perl\bin
D:\Green\Apache2\bin

Then open a dos window to run following commands:

dos> apache -k install
dos> apache -k start
  • The 1st command will add a service in windows services list called Apache2.
  • The 2nd command will start the Apache web server with default settings.

After this, you can open IE to visit your web server by either of below URLs. you should see the Apache welcome page if you generated them during the configuration above.

Following step is very important and must be taken! For running perl script named as .cgi or .pl on Apache, you should have below code at the first line in your each .pl or .cgi file:

#!d:/green/perl/bin/perl -w

Up to now, the Apache and Perl environment have been ready for use. visit these links for checking if Perl and PHP both work.

Reference

 

linux 下apache 配置虚拟主机

什么是虚拟主机虚拟主机用于在物理的一台主机上运行多个站点,譬如:www.example1.com、www.example2.com,也可以是这样的:www.example.com、blog.example.com。虚拟主机有两种类型:IP-based 和name-based,前者用于同一台主机上的多个站点具有不同的IP 地址,后者用于同一台主机上的多个站点使用同一个IP 地址,仅依靠名字来区分不同的站点。apache 1.1 版本之后开始支持这两种虚拟主机类型,平常我们一般谈到和用到的虚拟主机都是第二种类型:name-based 。name-based 的限制一些比较古老的浏览器无法正确访问虚拟主机的站点,这是因为部分基于http 1.0 的浏览器不发送http 主机头信息(host header)。所有基于http 1.1 的浏览器和部分比较流行的http 1.0 浏览器则不存在此问题。使用安全套接层协议(SSL)的服务器不能使用虚拟主机,这是由于SSL...

什么是虚拟主机

虚拟主机用于在物理的一台主机上运行多个站点,譬如:www.example1.com、www.example2.com,也可以是这样的:www.example.com、blog.example.com。

虚拟主机有两种类型:IP-basedname-based,前者用于同一台主机上的多个站点具有不同的IP 地址,后者用于同一台主机上的多个站点使用同一个IP 地址,仅依靠名字来区分不同的站点。

apache 1.1 版本之后开始支持这两种虚拟主机类型,平常我们一般谈到和用到的虚拟主机都是第二种类型:name-based 。

name-based 的限制

一些比较古老的浏览器无法正确访问虚拟主机的站点,这是因为部分基于http 1.0 的浏览器不发送http 主机头信息(host header)。所有基于http 1.1 的浏览器和部分比较流行的http 1.0 浏览器则不存在此问题。

使用安全套接层协议(SSL)的服务器不能使用虚拟主机,这是由于SSL 协议本身的特性决定的。

一些由操作系统或者网络设备实现的带宽管理技术会遇到问题,因为它们可能无法通过IP 区分不同的站点。

设置一个name-based 虚拟主机

以linux 环境采用apache 服务器为例,设置虚拟主机,需要有至少一个独立外网IP ,至少一个域名,并且可以修改二级域名,并不要求具有自己的DNS 服务器。

设置虚拟主机,只需要添加以下行到httpd.conf 文件,这个文件一般在/etc/httpd/conf/httpd.conf 可以找到。

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/html
</VirtualHost>

<VirtualHost *:80>
ServerName blog.example.com
DocumentRoot /var/www/html/blog
</VirtualHost>

剩下的工作就是去你的域名服务商处,设置DNS 解析,建立两个主机名,分别为www 与blog,指向的IP 相同,均为这台虚拟主机的IP 地址。这样就可以通过www.example.com 与blog.example.com 访问到同一台主机上的不同站点。

题外话:实现形入example.com 的解析,设置主机名为@ ,@ 代表域名自身。实现形入*.example.com 的解析,设置主机名为* 即可。

参考资源

Apache 2.0.46 整合Tomcat 5.5.9

Apache 使用RHEL AS3 中的默认安装版本,如果没有安装,到Apache 网站下载。 http://www.apache.org/ Tomcat 下载: http://jakarta.apache.org/tomcat/ JRE 或者JDK下载: http://www.sun.com/j2se/ 安装过程参考: linux下Tomcat 5.0.20 与...

Apache 使用RHEL AS3 中的默认安装版本,如果没有安装,到Apache 网站下载。

http://www.apache.org/

Tomcat 下载:

http://jakarta.apache.org/tomcat/

JRE 或者JDK下载:

http://www.sun.com/j2se/

安装过程参考:

两者分别安装成功,并可正常运行,时间原因,未继续完成整合配置,不过上面的资料可供今后参考。

mail.png


标签订阅|Tag Subscription

If you use an RSS reader, you can subscribe to a feed of all future entries tagged 'Apache'. [What is this?]

Subscribe to feed Subscribe to feed

最近更新|Recent Entries

不定期更新|Handy Entries

其它标签|Other Tags

分类栏目|Categories

按月归档|By Month

2008
11
10
07
05
04
03
02
01
2007
12
10
07
06
05
04
03
02
01
2006
12
11
10
09
08
07
06
05
04
03
02
01
2005
11
10
09
08
07
04
03
2004
12
11
10
09
08
07
06
05
04
03
02
01
2003
12
10
09
08
06
2002
09
08
04
03
02
2001
12
09
07
06
05

站内链接|Site Links

Powered by
Movable Type 3.34