[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] Confused about mod_perl and Apache::ASP (newbie) (long)
- Subject: [cobalt-users] Confused about mod_perl and Apache::ASP (newbie) (long)
- From: "Jason" <jason@xxxxxxxxxxxxx>
- Date: Fri Sep 15 18:25:52 2000
OK, first of all, let me state that I'm new (extremely) to the Unix
environment. I know basic navigation and what not, so any information you
give me has to be watered down a bit.
Here's my problem:
We've purchased a Raq4 and one of our clients is hosting on it. They need
us to install Apache::ASP for them. So, I shelled into CPAN (perl -MCPAN -e
shell) and then installed the Apache Bundle (install Bundle::Apache). I
assumed everything was fine until the client asked me the following:
"
What I want to know is, how is the server set up - do I have a specified
area that allows me to use mod_perl, or do I have to call all perl scripts
by a .pl extension, or what?
"
He then went on to ask:
"Apache::ASP, while written in perl, is a module for Apache, not something
for use in perl scripts. You need to somehow register it with Apache (I
believe docs are at http://www.apache-asp.org) so that it knows that
anything with a .asp (or some similar) extension is handled by Apache::ASP.
What Apache::ASP allows you to do is to write perl code instead of VBScript
in an ASP document. In fact, you could technically enclose a full CGI
script inside the <% and %> signs and call it an ASP doc, if you wanted.
Apache::ASP requires you to use mod_perl so that the perl interpreter is
embedded inside Apache.
Which brings me back to the question: Assuming the module is set up and
registered with Apache, how do I enable it for our site?"
After some research, I found out that I need to edit a file called
httpd.conf --on the WDVL web site, Aaron Weiss had an article about mod_perl
(http://www.wdvl.com/Authoring/Languages/Perl/PerlfortheWeb/index12.html)
Under the Basic Configuration article, he explains how to set-up the
http.conf file, but he mentions that the file should be located in the
directory /usr/local/apache/conf. When I do a locate for httpd.conf, this
is what I get:
[root /tmp]# locate httpd.conf
/etc/admserv/conf/httpd.conf
/etc/admserv/conf/httpd.conf.master
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/httpd.conf.master
Which of these am I supposed to edit? What information am I supposed to add
or take away from the httpd.conf file? Is there anything else I have to do
after that?
Finally, what do I need to tell the client?
I know I'm asking a lot here, but any information would be GREATFULLY
appreciated.
By the way, when I run this command:
[root /tmp]# /usr/sbin/httpd -v
I get this:
Server version: Apache/1.3.12 Cobalt (Unix)
Server built: Jun 28 2000 00:39:46
I'm assuming that's what version of Apache I'm running.
When I run:
[root /tmp]# lwp-request -e -d http://www.etherhost.com
I get this:
Connection: close
Date: Thu, 14 Sep 2000 15:18:11 GMT
Accept-Ranges: bytes
Server: Apache/1.3.12 Cobalt (Unix) mod_ssl/2.6.4 OpenSSL/0.9.5a
PHP/4.0.1pl2 mo
d_auth_pam/1.0a FrontPage/4.0.4.3 mod_perl/1.24
Content-Length: 8346
Content-Type: text/html
Content-Type: text/html; charset=iso-8859-1
ETag: "8e803-209a-399859fa"
Last-Modified: Mon, 14 Aug 2000 20:43:38 GMT
Client-Date: Thu, 14 Sep 2000 15:18:11 GMT
Client-Peer: 208.51.17.50:80
Title: ETHERHOST.COM: Superior Web Hosting
X-Meta-Description: From basic web hosting, to interactive Flash sites and
compl
icated e-commerce systems, Etherthost can help you take on the web. A
leader in
web site hosting and services. We are dedicated to providing the latest,
most u
p-to-date solutions possible. Certified 'In The Q' store provider.
X-Meta-Keywords: online stores, e-commerce solutions, web hosting services,
coba
lt RaQ servers, web based administration, simple shopping cart, online
product s
ales, website hosting provider, domain name services
X-Meta-ROBOTS: All
So it appears that I have mod_perl 1.24 and the Apache server software
(1.3.12) running.
If I type:
perldoc Apache::ASP
at the command line, it comes up with the manual.
Do I have everything installed then? If so, why don't I have an
/usr/local/apache directory where all of these test scripts, etc. I've heard
about are supposed to be located? Is there a step I'm missing?
If someone could give me instructions on how to clear up this whole
httpd.conf mess goes, I'd really appreciate it. I'm assuming once
everything is cool with the httpd.conf, I can run a file like this:
<HTML><HEAD><TITLE>Title</TITLE>Heading stuff.</HEAD>
<BODY>
<% my $variable = 'This is produced by ASP.'; $>
This is ordinary HTML text.
<%= $variable %>
</BODY>
</HTML>
and it would tell me everything is working (what extension do I use: html,
asp or cgi??)
Can someone help to clarify all of this? It's really confusing to me..
- Jason