Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hi, I need help configure my Apache with mod_perl.

I have just installed mod_perl on via sudo apt-get install -y libapache2-mod-perl2 on Ubuntu 18. I am having a hard time figuring out what the next steps our to test perl script. I am looking at https://perl.apache.org/docs/2.0/user/handlers/http.html and trying to understand what would go in my virtual hosts file and what else I need to configure to get perl script working for Apach24 setup.

I've tried a few virtual host directives such as the one found here (with my own settings), but with no luck: https://wiki.archlinux.org/index.php/Apache_HTTP_Server/mod_perl

<VirtualHost perlwebtest:80> Servername perlwebtest DocumentRoot /srv/http/perlwebtest ErrorLog /var/log/httpd/perlwebtest-error.log CustomLog /var/log/httpd/perlwebtest-access.log combined <Directory /srv/http/perlwebtest> AddHandler perl-script .pl PerlResponseHandler ModPerl::Registry Options +ExecCGI PerlOptions +ParseHeaders AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>

Currently, its not rending any of Perl Script. I feel like I've missed an obvious step. Any ideas of what I should try next?

.

In reply to configuring mod_perl on Apache2.4 (conf & virtual host help)? by knox

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-25 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found