logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Prepare Apache for CGI Scripts
Author
batulok



Joined: 19 Sep 2016
Posts: 2
Location: Tulsa, OK

PostPosted: Mon 19 Sep '16 14:29    Post subject: Prepare Apache for CGI Scripts Reply with quote

Using apache 2.4 and Oracle Virtual Box using the Red Hat (Linux) OS. I'm trying to prepare Apache to handle CGI scripts but I'm a little stuck. I believe I've downloaded all the necessary files. I know next I am supposed to do something in the configuration files. The page I'm currently stuck on is: https://httpd.apache.org/docs/2.4/howto/cgi.html

I'm not sure if I need to do everything on this page or one?

Thanks
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Mon 19 Sep '16 14:37    Post subject: Reply with quote

Load the module

LoadModule cgi_module modules/mod_cgi.so

it for cgi / pl files

Code:

<Files ~ "\.cgi$">
   Options Indexes FollowSymLinks ExecCGI
   Options +ExecCGI
   AddHandler cgi-script .cgi
</Files>
<Files ~ "\.pl$">
   Options Indexes FollowSymLinks ExecCGI
   Options +ExecCGI
   AddHandler cgi-script .pl
</Files>
Back to top
batulok



Joined: 19 Sep 2016
Posts: 2
Location: Tulsa, OK

PostPosted: Mon 19 Sep '16 16:58    Post subject: Reply with quote

Do I post that code in the httpd.conf file? Sorry, somewhat of a noob here.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 20 Sep '16 16:36    Post subject: Reply with quote

Uncomment the cgi_module line in /etc/httpd/conf/httpd.conf

The code block that I posted goes into your vhost where you want the perl scripts to run.
Back to top


Reply to topic   Topic: Prepare Apache for CGI Scripts View previous topic :: View next topic
Post new topic   Forum Index -> Apache