Advertisment

Run ASP Websites on Apache

author-image
PANKAJ
New Update

With ASP you can create dynamic Web pages using ActiveX scripting. Websites based on ASP run on IIS as both are from Microsoft. But, you can also run ASP on Linux with an Apache Web Server. Both commercial and free solutions are available for this, Chilly Soft being a commercial software and Apache::ASP being a free one. We'll use Apache::ASP, which can be installed only directly from the Net, so you'll need a good Net connect. 

Advertisment

First, install PCQLinux 8.0 (given with PCQuest, March 2003) on your server with the 'Everything' option and then install the latest glibc (given on this month's.PCQEssential CD). To install glibc, copy the Glibc folder from CD to the /root directory and issue the following commands. Then configure your network settings to access the Internet.

#cd /root/glibcfolder



#rpm —Uvh *

Now, configure CPAN, a software that will download Apache::ASP, check for dependency files and install the software. To configure CPAN, issue the following:

Advertisment

# perl —MCPAN —e —shell

For default settings, press Enter until it asks for the parameter for the Perl Make file command. Set this to POLLUTE=1, then press Enter. When CPAN asks for the parameter for the Make command, set it to UNINST=1. On the CPAN prompt (CPAN>) give the following command to upgrade CPAN to the latest version. 

CPAN>install CPAN

Advertisment

This will show a list of sites from where you can download Apache::ASP. Select the preferred location and the FTP site from the list. Next, issue the following commnand to install Apache::ASP from

CPAN.

CPAN>install Bundle::Apache::ASP

Now CPAN will download Apache::ASP with the required dependencies and install it. If you want to install extra/optional functionality, like FormFill, XSLT or SSI, issue the following command.

Advertisment

CPAN>install Bundle::Apache::ASP::Extra 

After finishing the process, type q in the CPAN prompt to quit from CPAN. 

Open Webmin from a Web browser by giving the URL http://127.0.0.1:10000. Give the user name as root and a blank password. Now select the Server icon from the Web page to see all available servers. Click on Apache Server to open a configuration page showing all the Apache modules. When you click on Continue, you will find an icon named Default WWW. Click on it and select Document option icon. From here you can change the location of sites (HTML files). By default the location is /var/ www/html. You need to change this location to a new location where you've stored ASP files. 

Advertisment

To check whether ASP is working on Apache, copy the ASP example files from /root/.cpan/Build/Apache-ASP-xxxx/site to a new location (Here, xxxx is replaced by Apache::ASP's latest version). Create a new folder ASP in /var/www/ as follows: 

#mkdir asp



# cd /root/.cpan/Build/Apache-ASP-xxxx/ (go to the dummy ASP site file location)


#cp —rpd ./site /var/www/html/asp (copy ASP example to /var/ww/html/asp) 


#chmod 777 /var/www/html/asp/*


#chmod 777 /var/www/html/asp/


Now open Webmin and change the default document path from Document option in Apache sever by giving path

/var/www/html/asp/. 

Advertisment

Save the settings, stop and start Apache from the Web page itself. Finally open a Web browser and type in

http://127.0.0.1.

This will show you an ASP site with some examples for testing. Click on any of the examples to check it out.

Anindya Roy and Sanjay Majumder

Advertisment