Reasons for installing the apache+asp environment under Linux

Source: Internet
Author: User

Why install the ASP environment under Linux? And look at these several reasons enough:

A. As a development environment under Linux
B. When the ASP in IIS is used only in the background, there is a small number of users. The front page is mainly displayed in the HTML static page, the ASP is used to do less, itself to the system's burden is very light

Comprehensive above, when the ASP appears a little chicken, the corresponding application can be transplanted to Linux, in order to give full play to Linux system platform advantages and resource advantages.
Because the ASP is the original product of IIS under Windows, porting to Linux is a little strange, so the implementation of the scheme is relatively small, the basic Perl escape can be found primarily.
Install the ASP environment under Linux the necessary environment support is: Apache+apache perl module +perl apache::asp Package, please see the installation steps:
1. Install apache::asp (also can be installed after step 3rd)

PERL-MCPAN-E Shell
Install CPAN
Install MLDBM
Install Mldbm::sync
Install apache::asp

If you fail to install through Perl, you can download these source packages:

Digest-md5-2.20.tar.gz
Mldbm-2.01.tar.gz
Mldbm-sync-0.30.tar.gz
Apache-asp-2.37.tar.gz

Expand the source code sequentially, performing the following installation:

Perl makefile.pl
Make
Make Test
Make install

2. Install Apache, simulate ASP environment in Linux environment currently only can find apache+asp scheme

#下载
Tar zxf httpd-2.2.15.tar.gz
CD httpd-2.2.15
./configure--prefix=/usr/local/apache
Make
Make install
Cd..

3. Install the Apache Mod_perl module

#下载apache的perl模块
Wget
Tar zxf mod_perl-2.0-current.tar.gz
CD mod_perl-2.0.4/
Perl Makefile.pluse_apxs=1 With_apxs=/usr/local/apache/bin/apxs Everything=1
Make
Make install
Cd..

4.HTTPD.CONF configuration:
Because the ASP environment is not the main environment we want to use under Linux, the main environment is nginx, so the Apache listening port is modified to a port other than 80 ports, I modified to 81

Listen 81

The site root directory also needs to be modified to Nginx site root directory, for example, my Nginx site root directory is:/var/webhosts/htdocs/www, then you need to modify the following 2 locations:

DocumentRoot "/var/webhosts/htdocs/www"

Append the following at the end of the httpd.conf file:

LoadModule Perl_module modules/mod_perl.so
Perlmodule apache::asp
SetHandler Perl-script
Perlhandler apache::asp
Perlsetvar Global.
Perlsetvar statedir/tmp/asp
Ok,asp Environment installation Complete, start Apache to try:

/usr/local/apache/bin/apachectl start

Create the test.asp under the site root directory as follows:

For loop incrementing font size:

<% for (1..7) {%>

Size = <%=$_%>

<%}%>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.