Need help configuring apache


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need help configuring apache
# 1  
Old 11-09-2010
Need help configuring apache

In this configuration file I added in /etc/httpd/conf.d, lets call it application.conf, and for some cgi scripts found outside the document root for the apache server, lets call the foreign folder /path/to/scripts/outside/documentroot, I'd like to know how to get it where the user types in http://www.website.com/name/application.cgi and it will run the script?

I've been playing around with something like:
$ cat > /etc/httpd/conf.d/application.conf
ScriptAlias /name/ "/path/to/scripts/outside/documentroot"
<Location /name/>
PassEnv SOME_ENV
</Location>

$ /etc/init.d/httpd restart

But it doesn't work. Is a good use of scriptalias? Should I use the directory directive instead? I have Apache/2.2.3. Please help, thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-la

Have no idea on what the below error message is: Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -buildfile build.xml dist. Any help? (3 Replies)
Discussion started by: gull05
3 Replies

2. Web Development

Apache module development on apache 2.2

Hi, I'm new to developing modules for Apache. I understand the basics now and can develop something simple which allows a 'GET' request to happen, but what I want to do is actually 'POST' information to my site. I know the basic POST Request works and I can see that it is post by looking at... (2 Replies)
Discussion started by: fishman2001
2 Replies

3. Shell Programming and Scripting

Configuring Apache an php Directory root.

Hi , I have installed apache and configured Document root as /home DocumentRoot "/home" The files under home directory is listed on the web server, i have one text file under "/home/test/1.txt" i can view the file when i set DocumentRoot to /home. But when i change Document root to ... (1 Reply)
Discussion started by: asak
1 Replies

4. SuSE

Need HELP, for configuring the samba

:wall: Anyone can help me..:wall: i'm still studying about the linux life.. so I'm still kinda confuse of using linux. Could you give me a little guide so that i can connect my SLED11 SP1(i586) to Windows server 2008.. What will i do first to that it would connect to the... (1 Reply)
Discussion started by: ksmedina18
1 Replies

5. AIX

Configuring SNMPv1

Hi, I think I got the SNMPv1 configured on my AIX 5308 box. I'm able to poll statistics from the system except the volumes. What am I missing so that I can get the volumes listed in the poll? (0 Replies)
Discussion started by: bbbngowc
0 Replies

6. AIX

Problem:Configuring Apache 2.2.11 in AIX 5.3

Hi All I am new to Apache and AIX and trying to configure Subversion tool in IBM machine with AIX 5.3.Apache is required for client to connect to Subversion Server with http protocol. 1.Installed Apache 2.2.11 and its dependencies via RPM 2.Configured httpd.conf file. 3.Started "httpd"... (1 Reply)
Discussion started by: rajivdp
1 Replies

7. UNIX and Linux Applications

Help configuring emacs

Hi, I am using emacs now after some months with vim (nothing agains vim, in fact I love it, but everyone around me is using emacs and xemacs) and I need some configuration help. How may I configure emacs to look like code examples in this page which is good for my eye. Thanks in advance, ... (0 Replies)
Discussion started by: faizlo
0 Replies

8. Web Development

Need help for Configuring Squid-2.6

Hi, Previously I was using squid-2.5 accelerated but due to link breaking issue, I have upgraded it to 2.6 but i am unable to configure it with accelerated support. Kindly help me to make it accelerated proxy server. My 2.6 squid.conf : ##################################################... (0 Replies)
Discussion started by: jagnikam
0 Replies

9. UNIX for Advanced & Expert Users

Configuring a modem on a P5

Hello. I'm trying to configure a modem on an IBM p570 on the serial port. This is a partition machine so i want to be able to share it with partitionned servers. On my VIOserver, what needs to be done exactly? I can see a vsa0 device but that is not the serial port i need from what i... (1 Reply)
Discussion started by: Stephan
1 Replies

10. UNIX for Advanced & Expert Users

Configuring.....

Hi Folks, I would like to learn the basics of unix administration like configuring telnet, ftp, smtp,etc.. Could u suggest me a good site for learning it??? or the methodology that has to be followed for learning it??? TIA, Nisha :) (2 Replies)
Discussion started by: Nisha
2 Replies
Login or Register to Ask a Question
libapache2-mod-perl2-2.0.7::docs::api::ModPerl::RegistryUsereContributed Perl Dlibapache2-mod-perl2-2.0.7::docs::api::ModPerl::RegistryLoader(3pm)

NAME
ModPerl::RegistryLoader - Compile ModPerl::RegistryCooker scripts at server startup Synopsis # in startup.pl use ModPerl::RegistryLoader (); use File::Spec (); # explicit uri => filename mapping my $rlbb = ModPerl::RegistryLoader->new( package => 'ModPerl::RegistryBB', debug => 1, # default 0 ); $rlbb->handler($uri, $filename); ### # uri => filename mapping using a helper function sub trans { my $uri = shift; $uri =~ s|^/registry/|cgi-bin/|; return File::Spec->catfile(Apache2::ServerUtil::server_root, $uri); } my $rl = ModPerl::RegistryLoader->new( package => 'ModPerl::Registry', trans => &trans, ); $rl->handler($uri); ### $rlbb->handler($uri, $filename, $virtual_hostname); Description This modules allows compilation of scripts, running under packages derived from "ModPerl::RegistryCooker", at server startup. The script's handler routine is compiled by the parent server, of which children get a copy and thus saves some memory by initially sharing the compiled copy with the parent and saving the overhead of script's compilation on the first request in every httpd instance. This module is of course useless for those running the "ModPerl::PerlRun" handler, because the scripts get recompiled on each request under this handler. Methods new() When creating a new "ModPerl::RegistryLoader" object, one has to specify which of the "ModPerl::RegistryCooker" derived modules to use. For example if a script is going to run under "ModPerl::RegistryBB" the object is initialized as: my $rlbb = ModPerl::RegistryLoader->new( package => 'ModPerl::RegistryBB', ); If the package is not specified "ModPerl::Registry" is assumed: my $rlbb = ModPerl::RegistryLoader->new(); To turn the debugging on, set the debug attribute to a true value: my $rlbb = ModPerl::RegistryLoader->new( package => 'ModPerl::RegistryBB', debug => 1, ); Instead of specifying explicitly a filename for each uri passed to handler(), a special attribute trans can be set to a subroutine to perform automatic remapping. my $rlbb = ModPerl::RegistryLoader->new( package => 'ModPerl::RegistryBB', trans => &trans, ); See the handler() item for an example of using the trans attribute. handler() $rl->handler($uri, [$filename, [$virtual_hostname]]); The handler() method takes argument of "uri" and optionally of "filename" and of "virtual_hostname". URI to filename translation normally doesn't happen until HTTP request time, so we're forced to roll our own translation. If the filename is supplied it's used in translation. If the filename is omitted and a "trans" subroutine was not set in new(), the loader will try using the "uri" relative to the "ServerRoot" configuration directive. For example: httpd.conf: ----------- ServerRoot /usr/local/apache Alias /registry/ /usr/local/apache/cgi-bin/ startup.pl: ----------- use ModPerl::RegistryLoader (); my $rl = ModPerl::RegistryLoader->new( package => 'ModPerl::Registry', ); # preload /usr/local/apache/cgi-bin/test.pl $rl->handler(/registry/test.pl); To make the loader smarter about the URI->filename translation, you may provide the "new()" method with a "trans()" function to translate the uri to filename. The following example will pre-load all files ending with .pl in the cgi-bin directory relative to "ServerRoot". httpd.conf: ----------- ServerRoot /usr/local/apache Alias /registry/ /usr/local/apache/cgi-bin/ startup.pl: ----------- { # test the scripts pre-loading by using trans sub use ModPerl::RegistryLoader (); use File::Spec (); use DirHandle (); use strict; my $dir = File::Spec->catdir(Apache2::ServerUtil::server_root, "cgi-bin"); sub trans { my $uri = shift; $uri =~ s|^/registry/|cgi-bin/|; return File::Spec->catfile(Apache2::ServerUtil::server_root, $uri); } my $rl = ModPerl::RegistryLoader->new( package => "ModPerl::Registry", trans => &trans, ); my $dh = DirHandle->new($dir) or die $!; for my $file ($dh->read) { next unless $file =~ /.pl$/; $rl->handler("/registry/$file"); } } If $virtual_hostname argument is passed it'll be used in the creation of the package name the script will be compiled into for those registry handlers that use namespace_from_uri() method. See also the notes on $ModPerl::RegistryCooker::NameWithVirtualHost in the "ModPerl::RegistryCooker" documentation. Also explained in the "ModPerl::RegistryLoader" documentation, this only has an effect at run time if $ModPerl::RegistryCooker::NameWithVirtualHost is set to true, otherwise the $virtual_hostname argument is ignored. Implementation Notes "ModPerl::RegistryLoader" performs a very simple job, at run time it loads and sub-classes the module passed via the package attribute and overrides some of its functions, to emulate the run-time environment. This allows one to preload the same script into different registry environments. Authors The original "Apache2::RegistryLoader" implemented by Doug MacEachern. Stas Bekman did the porting to the new registry framework based on "ModPerl::RegistryLoader". SEE ALSO
"ModPerl::RegistryCooker", "ModPerl::Registry", "ModPerl::RegistryBB", "ModPerl::PerlRun", Apache(3), mod_perl(3) perl v5.14.2 2013-03-12 libapache2-mod-perl2-2.0.7::docs::api::ModPerl::RegistryLoader(3pm)