Why install Apache+ASP environment under Linux

  

Why install ASP environment under Linux? And look at these reasons is not enough:

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

Comprehensive, when ASP seems a bit sloppy, the corresponding application can be fully transplanted to Linux, in order to give full play to the advantages of the system platform under Linux And resource advantages. Because ASP is the original production of IIS under Windows, it is really weird to port to Linux, so the implementation scheme is relatively small. The basics that can be found at present are mainly Perl escaping. The environment support for installing ASP environment under Linux is: Apache+Apache perl module +perl Apache::ASP package, please see the installation steps: 1. Install Apache::ASP (can also be installed after step 3) Br>

perl -MCPAN -e shell install CPAN install MLDBM install MLDBM::Sync install Apache::ASP

If the installation fails via perl, you can download these source code 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 in order, each Do the following to install:

perl Makefile.PL make make test make install

2. Install Apache, simulate ASP environment in Linux environment, only Apache+ASP solution can be found at present. >

#download tar zxf httpd-2.2.15.tar.gz cd httpd-2.2.15 ./configure --prefix=/usr/local/apache make make install cd ..

3. Install apache mod_perl module

#Download apache perl module 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 mak e make install cd ..

4.httpd.conf configuration: Because the ASP environment is not the main environment we use in Linux, the main environment is Nginx, so modify the Apache listening port to 80 port. External port, I modified it to 81

Listen 81

The root directory of the website also needs to be modified to the root directory of the Nginx website. For example, the root directory of my Nginx website is: /var/webhosts/htdocs/Www, then you need to modify the following two locations:

DocumentRoot "/var/webhosts/htdocs/www"

Add 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 is complete, start Apache try :)

/Usr/local/apache/bin/apachectl start

Create test.asp in the root directory of the website, as follows:

For loop incrementing font size:

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

Size = <%=$_%>

<% } %>

Copyright © Windows knowledge All Rights Reserved