small python cgi webserver

Fabian Braennstroem f.braennstroem at gmx.de
Sat Nov 4 09:29:00 EST 2006


Hi Norbert,

* Norbert Kaufmann <norbert at akumakun.de> wrote:
> Fabian Braennstroem wrote:
> [...]
>> 
>> Maybe, I understood something wrong, but I thought that the
>> above 'webserver' script would replace apache in my case; at
>> least I hoped!?
>> 
>
> It does. The 'ServerRoot' and 'DocumentRoot' directories are the
> directories you are starting your webserver in.
> Create a 'cgi' directory inside this and consider that you have to name
> it in the serverscript in relation to the serverroot!
>
> <quote>
> cgi_directories=["/home/fab/Desktop/cgi-bin"]
> </quote>
>
> This means you have to start your server inside directory '/'.

I tried this, but it does not help ... a wait, the leading
'/' is the problem. Thanks!
>
> If you start your server in your home dir '/home/fab' then you have to
> name your cgi_directories ['/Desktop/cgi-bin'].
>
> In your response (cgi-script) you have to divide the header from the
> content '\r\n\r\n'.

I am not sure, what that means!?  ... but it works :-)

Greetings!
 Fabian




More information about the Python-list mailing list