httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Cicimov <icici...@gmail.com>
Subject Re: [users@httpd] rewrite engine shows text instead of executes script
Date Tue, 31 Jan 2012 01:01:09 GMT
Plus if the  journalLoader.py is a script then the directive

DirectoryIndex journalLoader.py

doesn't make any sense to me.

On Tue, Jan 31, 2012 at 11:59 AM, Igor Cicimov <icicimov@gmail.com> wrote:

> You need to tell apache you want it to handle the pyton files as scripts
> not as html/text files.
>
> AddHandler cgi-script .cgi .pl .py
>
> You (or someone else) have probably done that on linux but you are not
> aware or have forgotten about it.
>
> Igor
>
>
> On Tue, Jan 31, 2012 at 10:18 AM, Tim Johnson <tim@akwebsoft.com> wrote:
>
>> To the best to my memory, the following .htaccess worked on linux, but
>> on OSX, the result is that the browser gives me the text of the
>> script, rather the output of the script.
>> FYI: The script is fully functional when requested via cgi-bin.
>>
>> # .htaccess
>> RewriteEngine On
>> DirectoryIndex journalLoader.py
>> RewriteCond $1
>> !^(journalLoader\.py|images|css|js|robots\.txt|favicon\.ico)
>> RewriteCond %{REQUEST_FILENAME} !-f
>> RewriteCond %{REQUEST_FILENAME} !-d
>> RewriteRule ^(.*)$ ./journalLoader.py/$1 [L,QSA]
>> # /.htaccess
>>
>> the script journalLoader.py is at the path
>> http://linus.johnson.com/cgi-bin/baker/journal/journalLoader.py
>> (internal search domain) and when requested provides the
>> output I expect.
>>
>> The directory/folder contain journalLoader.py is symlinked to
>> my wwwroot directory.
>> When I point my browser to http://linus.johnson.com/journal
>> !!!!!!
>> The server gives me the text for the script rather than the output
>> !!!!!!
>> I'm woefully underinformed when it comes to .htaccess and mode
>> rewrite, but it occurs to me that if this works on a linux box and
>> not the the OSX platform, some configuration is need for Apache?
>> What would that be?
>>
>> thanks
>> --
>> Tim
>> tim at tee jay forty nine dot com or akwebsoft dot com
>> http://www.akwebsoft.com
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>

Mime
View raw message