how to setup and run python cgi on linux centos 5.4 and pache 2.2.3

332 views
Skip to first unread message

Hatem El-Zanaty

unread,
Feb 7, 2010, 2:04:44 AM2/7/10
to utahp...@googlegroups.com
hi all,
can any body guide me how to install and configure python cgi on linux centos 5.4 and apache 2.2.3 to run files of python as a web application
thanks in advance
Best Regards
hatem gamal

Stephen McQuay

unread,
Feb 7, 2010, 2:17:51 AM2/7/10
to utahp...@googlegroups.com
Hatem --

Do you have a particular reason to use python+cgi with apache? Having set up a moderately complicated website which, in retrospect, I would consider to be the  'wrong' or 'unnecessarily difficult' way, I would recommend you look at using one of the popular python web frame works (Django being my personal favorite).

However, with that suggestion in mind, if you insist on doing things the hard way here's what you dump into your /etc/<whatever redhat calls apache>/sites-enabled/000-default file:

<Directory /var/www/cgi-bin>
  Options +ExecCGI
  AddHandler cgi-script pl cgi
</Directory>

I don't know that the 'pl' does anything useful there, and the /var/www/cgi-bin folder is where you place your cgi scripts.

Good luck.

--
You received this message because you are subscribed to the Google Groups "Utah Python User Group" group.
To post to this group, send email to utahp...@googlegroups.com.
To unsubscribe from this group, send email to utahpython+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/utahpython?hl=en.



--
Stephen Mardson McQuay
mardson.com

Hatem El-Zanaty

unread,
Feb 7, 2010, 4:46:26 AM2/7/10
to utahp...@googlegroups.com
Dear Stephen McQuay,
thanks alot for your help it works fine
Best Regards
hatem gamal
Reply all
Reply to author
Forward
0 new messages