Problem configuring apache to run python cgi on Ubuntu 14.04

Albert Visser albert.visser at gmail.com
Mon Sep 21 21:28:54 CEST 2015


On Mon, 21 Sep 2015 20:41:13 +0200, <tropical.dude.net at gmail.com> wrote:

> Hello everybody,
>
(...)
>
> I created index.py:
> #!/usr/bin/env python
> # -*- coding: UTF-8 -*-# enable debugging
> import cgitb
>
> cgitb.enable()
> print("Content-Type: text/html;charset=utf-8")
> print("Hello World!")
>
> But it is still not working.
>
> Can anybody help me out?
>
> Thanks in advance.

Which Python are you running? If it's Python 3, change the shebang  
accordingly because "python" is assuming Python 2.

-- 
Vriendelijke groeten / Kind regards,

Albert Visser

Using Opera's mail client: http://www.opera.com/mail/


More information about the Python-list mailing list