LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-22-2003, 07:58 PM   #1
ash_r_c
LQ Newbie
 
Registered: Sep 2003
Posts: 1

Rep: Reputation: 0
Question configuring apache for cgi scripts


I am trying to run python scripts on apache. UN fortunately, each time i click on the submit, the script doesnt execute. Instead the text of the entire script is dumped on the screen ( to the browser). I dont know what setting i need to change in the httpd.conf file to get the scritps running. can anyone please help me with this?
 
Old 09-23-2003, 04:03 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
First off, make sure that your script is executable, and that regular users have permission to execute it. Make sure that the shebang line points to your python interpreter ie: #!/usr/bin/python

Now: You are looking for a section in httpd.conf that looks like this:
Code:
<Directory "/home/httpd/htdocs">

#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
    Options Indexes FollowSymLinks MultiViews

#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
    AllowOverride None

#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all
</Directory>
You are going to want to add 'ExecCGI' to the 'Options line:

Code:
Options Indexes FollowSymLinks MultiViews ExecCGI
HSH
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant run CGI scripts on Apache! mylo2003 Linux - General 5 11-09-2004 09:22 AM
apache & cgi scripts maze_fire Linux - Networking 1 08-12-2004 02:58 PM
help setting up Apache to use cgi scripts limiter Linux - Software 2 03-25-2004 01:59 PM
Apache 2.0.43 will not run cgi scripts RobbieRoy Linux - Networking 5 09-04-2003 02:56 PM
Apache cgi scripts! boyinfrance Linux - Newbie 2 06-22-2002 10:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration