Problems getting Python scripts to run on server
7stud
bbxx789_05ss at yahoo.com
Thu Jan 24 13:52:59 EST 2008
On Jan 23, 11:30 pm, 7stud <bbxx789_0... at yahoo.com> wrote:
I just wanted to point out that the <Directory> tag below would go in
the httpd.conf file(a config file for apache), which you apparently do
not have access to. I was suggesting that you check with your host to
make sure they have the right AllowOverride line.
>
> 3) "What you can put in <.htaccess> files is determined by the
> AllowOverride directive."
>
> e.g.
>
> <Directory "/Library/Apache2/cgi-bin">
> AllowOverride FileInfo
> Options None
> Order allow,deny
> Allow from all
> </Directory>
>
> "Note: you must have "AllowOverride Options" in effect to permit the
> use of the "Options" directive in .htaccess files."
>
> So, in the above example the line starting with AllowOverride would
> need to have "Options" instead of FileInfo(or maybe in addition to?).
>
> More info fromhttp://httpd.apache.org/docs/2.0/howto/htaccess.html:
> -------
> Finally, you may wish to use a .htaccess file to permit the execution
> of CGI programs in a particular directory. This may be implemented
> with the following configuration:
>
> Options +ExecCGI
> AddHandler cgi-script cgi pl
>
> Alternately, if you wish to have all files in the given directory be
> considered to be CGI programs, this may be done with the following
> configuration:
>
> Options +ExecCGI
> SetHandler cgi-script
>
> Note that AllowOverride Options and AllowOverride FileInfo must both
> be in effect for these directives to have any effect.
>
> Please see the CGI tutorial for a more complete discussion of CGI
> programming and configuration.
> -----
>
> According to that passage, you should have the extension 'py' not
> '.py' in the AddHandler part. I don't know if that makes a
> difference. Go to that web page and click the link to the CGI
> tutorial, and maybe you can find some clues on how to configure your
> directories with .htacesss files.
More information about the Python-list
mailing list