Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

use .py as extension for cgi scripts

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
How to set PATH for cgi-scripts? - I am trying to persuade Apache 2.0 look into when doing system() calls from a Perl I am using the Fedora Core 1 rpms and would prefer not to have to recompile anything. I have tried to set SetEnv PATH..

Pretty Scripts - Dear Friends, I'm a newbie who has Apache 2.0.47 several weeks ago, and has built my own cgi app (an .exe from the Clipper DDMS compiler -- based on C). I'm running on win98se and winXp now. I'm using localhost now, but next..

Can run cgi scripts in different directory? - I am trying to get apache to run scripts from a different directory other than the standard one. I have added the add handler statement and believe I have set up apache I here that It has something to do with chroot? Any..

I cannot get php scripts to work in Apache. - I cannot get php scripts to work in Apache. Apache 2.0.52 and PHP 5.0.2 installed on XP Pro SP2 Box. PHP works fine from the command line, in any Apache works fine serving straight .htm and .html content, but ignores between..

Apache2 CGI scripts nor executing - Hello, How do I switch on CGI script I have: Options ExecCGI for the but it still does not execute the scripts. Is mod_perl Thanks, Guru
Next:  Apache: regexp output filtering  
Author Message
yorklee70

External


Since: Nov 25, 2004
Posts: 2



(Msg. 1) Posted: Thu Nov 25, 2004 9:54 pm
Post subject: use .py as extension for cgi scripts
Archived from groups: alt>apache>configuration (more info?)

Hi, everybody,

My apache can run scripts with extension (.cgi, .pl, .py) in
/var/www/cgi-bin. In ~/user/public_html/cgi-bin, scripts with extension
..cgi or .pl are OK, but .py cannot be run, it always display the source
code even if I add "AddHandler cgi-script .py" in the httpd.conf. Did
anybody experience the same problem?

Thanks,

York

 >> Stay informed about: use .py as extension for cgi scripts 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Fri Nov 26, 2004 2:35 am
Post subject: Re: use .py as extension for cgi scripts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2004-11-26, York <yorklee70.DeleteThis@gmail.com> wrote:
 > .cgi or .pl are OK, but .py cannot be run, it always display the source
 > code even if I add "AddHandler cgi-script .py" in the httpd.conf. Did
 > anybody experience the same problem?

No. In theory, if you have a ScriptAlias directive, everything in the
directory is executed if the file is executable and the right interpreter
can be found. Check the rights on the directory and the scripts.

Davide

--
Best viewed with Internet Explorer 5.6 on a 1280x1024 resolution with
24-bit color depth, maximum contrast, minimum brightness, in a 1000x960
window placed in the exact center of your display with this videocard
and .... -- from alt.sysadmin.recovery<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: use .py as extension for cgi scripts 
Back to top
Login to vote
yorklee70

External


Since: Nov 25, 2004
Posts: 2



(Msg. 3) Posted: Fri Nov 26, 2004 12:31 pm
Post subject: Re: use .py as extension for cgi scripts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It is OK now, after I reboot the computer.

York


York wrote:
 > Hi, everybody,
 >
 > My apache can run scripts with extension (.cgi, .pl, .py) in
 > /var/www/cgi-bin. In ~/user/public_html/cgi-bin, scripts with extension
 > .cgi or .pl are OK, but .py cannot be run, it always display the source
 > code even if I add "AddHandler cgi-script .py" in the httpd.conf. Did
 > anybody experience the same problem?
 >
 > Thanks,
 >
 > York<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: use .py as extension for cgi scripts 
Back to top
Login to vote
notvalid

External


Since: Jul 15, 2004
Posts: 33



(Msg. 4) Posted: Sun Nov 28, 2004 2:35 am
Post subject: Re: use .py as extension for cgi scripts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

York wrote:

 > It is OK now, after I reboot the computer.
 >
Reboot? Why? What has that got to do with anything?
Eric<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: use .py as extension for cgi scripts 
Back to top
Login to vote
mfuhr

External


Since: Nov 17, 2003
Posts: 44



(Msg. 5) Posted: Sun Nov 28, 2004 2:35 am
Post subject: Re: use .py as extension for cgi scripts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Eric <notValid.RemoveThis@comcast.net> writes:

 > York wrote:
 >
  > > It is OK now, after I reboot the computer.
  > >
 > Reboot? Why? What has that got to do with anything?

Maybe Apache needed to be restarted after a config file change.
Rebooting the box would be a drastic way of doing that.

--
Michael Fuhr
<a style='text-decoration: underline;' href="http://www.fuhr.org/~mfuhr/" target="_blank">http://www.fuhr.org/~mfuhr/</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: use .py as extension for cgi scripts 
Back to top
Login to vote
notvalid

External


Since: Jul 15, 2004
Posts: 33



(Msg. 6) Posted: Sun Nov 28, 2004 2:35 pm
Post subject: Re: use .py as extension for cgi scripts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Michael Fuhr wrote:

 > Eric <notValid.RemoveThis@comcast.net> writes:
 >
  >> York wrote:
  >>
   >> > It is OK now, after I reboot the computer.
   >> >
  >> Reboot? Why? What has that got to do with anything?
 >
 > Maybe Apache needed to be restarted after a config file change.
 > Rebooting the box would be a drastic way of doing that.
 >
I would assume he knows that, wouldnt it be one of the very first things you
would learn when contemplating having a website - how to restart apache to
make it see config file changes? Just seems very weird to me to shut the
entire machine off. Kind of like changing radio stations in your car and
shutting the engine off each time. Oh well, if it works for him....
Eric<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: use .py as extension for cgi scripts 
Back to top
Login to vote
mfuhr

External


Since: Nov 17, 2003
Posts: 44



(Msg. 7) Posted: Sun Nov 28, 2004 2:35 pm
Post subject: Re: use .py as extension for cgi scripts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Eric <notValid DeleteThis @comcast.net> writes:

 > Michael Fuhr wrote:
 >
  > > Eric <notValid DeleteThis @comcast.net> writes:
  > >
   > >> York wrote:
   > >>
   > >> > It is OK now, after I reboot the computer.
   > >> >
   > >> Reboot? Why? What has that got to do with anything?
  > >
  > > Maybe Apache needed to be restarted after a config file change.
  > > Rebooting the box would be a drastic way of doing that.
  > >
 > I would assume he knows that, wouldnt it be one of the very first things you
 > would learn when contemplating having a website - how to restart apache to
 > make it see config file changes?

False assumption -- novices don't always know what the experienced
take for granted.

 > Just seems very weird to me to shut the entire machine off. Kind
 > of like changing radio stations in your car and shutting the engine
 > off each time.

It's not weird if you don't know any better, especially if you've
worked in an environment where "reboot if it doesn't work" is a
standard troubleshooting technique.

 > Oh well, if it works for him....

It may work, but it would be good to learn *why* it worked. If you
learn that a reboot worked because it restarted the web server,
then you're a step closer to knowing that you can simply restart
the web server, thus saving time and not interrupting other system
activity. On the other hand, if restarting the web server doesn't
work but a reboot does, then you still have a mystery that ought
to be solved.

--
Michael Fuhr
<a style='text-decoration: underline;' href="http://www.fuhr.org/~mfuhr/" target="_blank">http://www.fuhr.org/~mfuhr/</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: use .py as extension for cgi scripts 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]