Getting mod_perl working under mod_ssl virtual host 
Author Message
 Getting mod_perl working under mod_ssl virtual host

Hi,

I've got a recent version of apache with mod_ssl and mod_perl. I've got
mod_ssl working under a virtual host, so if i connect to
http://localhost:8080, i get the normal apache, but if i do
https://localhost:8443,
I get a secure server. Both hosts have different DocumentRoots.

Everything works fine, except that my perl scripts are being run as normal
cgi scripts under the secure virtual host. The 'main' server runs the perl
scripts under mod_perl though.

Here is my configuration from httpd.conf:

The main server configuration section contains this:
    #
    # Set the following for mod_perl
    #
    Alias /perl/  "/home/students/ug/ug80aab/local/apache/perl/"
    PerlModule Apache::Registry
    PerlTaintCheck On
    PerlRequire
    /home/students/ug/ug80aab/local/apache/htdocs/soct/perl/startup.pl

    <Location /perl/>
        SetHandler  perl-script
        PerlHandler Apache::Registry
        Options +ExecCGI
        AllowOverride None
        Order allow,deny
        Allow from all
    </Location>

and the virtual host section contains this:

Alias /perl/ /home/students/ug/ug80aab/local/apache/htdocs/soct/perl/

PerlModule Apache::Registry
PerlTaintCheck On
PerlRequire
/home/students/ug/ug80aab/local/apache/htdocs/soct/perl/startup.pl

<Location /perl/>
        SetHandler  perl-script
        PerlHandler Apache::Registry
        Options +ExecCGI
        AllowOverride None
        Order allow,deny
        Allow from all
</Location>

I really need to be able to run scripts on the secure server under
mod_perl. Has anyone got any ideas what might be happening, and how this
can be fixed.

Thanks, Al.



Mon, 09 Aug 2004 20:55:22 GMT  
 Getting mod_perl working under mod_ssl virtual host

Actually, this isn't the problem. The problem is that when I include a
file in the /perl/ directory as a server-side included file, it runs under
plain cgi, not mod_perl.

Does anyone know how I can get files in the /perl/ directory to run under
mod_perl when included in .shtml files?

Thanks, Al.



Tue, 10 Aug 2004 18:54:10 GMT  
 Getting mod_perl working under mod_ssl virtual host

Quote:



> Actually, this isn't the problem. The problem is that when I include a
> file in the /perl/ directory as a server-side included file, it runs
> under plain cgi, not mod_perl.
> Does anyone know how I can get files in the /perl/ directory to run
> under mod_perl when included in .shtml files?  Thanks, Al.

Fixed this. My SSI tags were like <!--#exec cmd="/perl/test.pl"--> rather
than <!--#include virtual="/perl/test.pl"-->

Al.



Tue, 10 Aug 2004 18:57:55 GMT  
 Getting mod_perl working under mod_ssl virtual host

Al> Fixed this. My SSI tags were like <!--#exec cmd="/perl/test.pl"--> rather
Al> than <!--#include virtual="/perl/test.pl"-->

Just for the record, I bet you meant #exec cgi, not #exec cmd there.
#exec cmd would have run them as an external shell, and using
a Unix path, so they wouldn't have run at all unless you have a /perl
in your filesystem.  Whereas #exec cgi runs the virtual path,
but forces it to be mod_cgi, one of the reasons that #exec cgi is
shown as discouraged in all modern documentation.

print "Just another Perl hacker," # with a strong working knowledge of Apache..

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095

Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



Wed, 11 Aug 2004 02:40:27 GMT  
 Getting mod_perl working under mod_ssl virtual host
Try add
<Files ~ "test.pl">
        SetHandler perl-script
        PerlHandler Apache::Registry
        PerlSendHeader On
        Options ExecCGI
</Files>
Quote:

> Actually, this isn't the problem. The problem is that when I include a
> file in the /perl/ directory as a server-side included file, it runs under
> plain cgi, not mod_perl.

> Does anyone know how I can get files in the /perl/ directory to run under
> mod_perl when included in .shtml files?

> Thanks, Al.



Wed, 11 Aug 2004 03:00:46 GMT  
 Getting mod_perl working under mod_ssl virtual host
On Feb 22, Randal L. Schwartz inscribed on the eternal scroll:

Quote:
> Just for the record, I bet you meant #exec cgi, not #exec cmd there.

On the other hand, quite a number of people who think they want
to say #exec cgi to Apache, find out in due course that they
really should have said #include virtual

(But this is drifting off topic.  The key issue is that SSI is a
concept, rather than an interworking standard.  The details differ
between different server implementations, so on this issue the hon.
Usenaut should be looking in the documentation for the HTTPD which
they use, then seeking advice on the relevant
comp.infosystems.www.servers.* group.

cheers



Wed, 11 Aug 2004 03:12:15 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. mod_perl, apache, virtual host problem

2. mod_perl virtual web hosting?

3. mod_perl, apache, virtual host problem

4. getting the virtual host info...

5. getting the real virtual host

6. To all Virtual Hosting Company (URGENT HOST WANTED)

7. Compilation error apache 1.3.9+mod_perl+mod_ssl

8. Host your WEB DESIGNS and organize WEB OFFICES with our Virtual Servers

9. McGraw-Hill Education Examines Career Readiness Issues, Hosts 21st Century Workforce Virtual Conference

10. perl virtual hosts

11. Log rotator script for virtual hosting

12. Config module and virtual hosts

 

 
Powered by phpBB® Forum Software