Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96957

Re: Problem configuring apache to run python cgi on Ubuntu 14.04

Subject Re: Problem configuring apache to run python cgi on Ubuntu 14.04
References <44e870a7-9567-40ba-8a65-d6b52a8c5d25@googlegroups.com>
Date 2015-09-21 21:28 +0200
From "Albert Visser" <albert.visser@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.45.1442863741.28679.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, 21 Sep 2015 20:41:13 +0200, <tropical.dude.net@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/

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Problem configuring apache to run python cgi on Ubuntu 14.04 tropical.dude.net@gmail.com - 2015-09-21 11:41 -0700
  Re: Problem configuring apache to run python cgi on Ubuntu 14.04 sohcahtoa82@gmail.com - 2015-09-21 12:19 -0700
    Re: Problem configuring apache to run python cgi on Ubuntu 14.04 tropical.dude.net@gmail.com - 2015-09-21 12:39 -0700
  Re: Problem configuring apache to run python cgi on Ubuntu 14.04 "Albert Visser" <albert.visser@gmail.com> - 2015-09-21 21:28 +0200
    Re: Problem configuring apache to run python cgi on Ubuntu 14.04 tropical.dude.net@gmail.com - 2015-09-21 12:44 -0700
  Re: Problem configuring apache to run python cgi on Ubuntu 14.04 John Gordon <gordon@panix.com> - 2015-09-21 19:41 +0000
    Re: Problem configuring apache to run python cgi on Ubuntu 14.04 tropical.dude.net@gmail.com - 2015-09-21 12:47 -0700
      Re: Problem configuring apache to run python cgi on Ubuntu 14.04 tropical.dude.net@gmail.com - 2015-09-21 12:51 -0700
        Re: Problem configuring apache to run python cgi on Ubuntu 14.04 alister <alister.nospam.ware@ntlworld.com> - 2015-09-21 20:29 +0000
          Re: Problem configuring apache to run python cgi on Ubuntu 14.04 tropical.dude.net@gmail.com - 2015-09-21 14:36 -0700
            Re: Problem configuring apache to run python cgi on Ubuntu 14.04 Chris Angelico <rosuav@gmail.com> - 2015-09-22 08:36 +1000

csiph-web