You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tim Johnson <ti...@akwebsoft.com> on 2013/02/27 01:49:13 UTC

[users@httpd] apache prints python code rather than executes (fastcgi)

Using apache on Mac OSX 10.7.
I have a test django application with a executable file named

index.fcgi (permissions = 755)

My .htaccess looks like this :
#############################################################
AcceptPathInfo On
AddHandler fcgid-script .fcgi
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.fcgi/$1 [L,QSA]
#############################################################
When I point my browser to the directory in which the file
is located, the code is printed out, rather than executed.

I'm sure that there are other options to be enabled, but I am brand
new to fastcgi (note: fastcgi is enabled).

If this is deployed to a website where my domain is hosted, I will
not have access to apache configuration, thus .htaccess must do
all the work (if possible).

TIA
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache prints python code rather than executes (fastcgi)

Posted by Tim Johnson <ti...@akwebsoft.com>.
* Igor Cicimov <ic...@gmail.com> [130227 07:11]:
> On 27/02/2013 11:49 AM, "Tim Johnson" <ti...@akwebsoft.com> wrote:
> Try adding
> Options +ExecCGI
  Hi Again Igor :
  As I responded before, that was not the solution. 
  I changed 
  AddHandler fcgid-script .fcgi
  AddHandler fastcgi-script .fcgi
  And now Apache is actually attempting to execute the script.
  There's another problem, but now apache is giving me (somewhat)
  meaningful error messages, so I will trouble - shoot them and post
  under a new thread if I am stumped (which is likely)
  thanks again for you response
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache prints python code rather than executes (fastcgi)

Posted by Igor Cicimov <ic...@gmail.com>.
On 28/02/2013 3:29 AM, "Tim Johnson" <ti...@akwebsoft.com> wrote:
>
> * Igor Cicimov <ic...@gmail.com> [130227 07:11]:
> > On 27/02/2013 11:49 AM, "Tim Johnson" <ti...@akwebsoft.com> wrote:
> > > new to fastcgi (note: fastcgi is enabled).
> > >
> > Try adding
> > Options +ExecCGI
>   Thanks Igor, but that didn't change things (had tried in past)
>   regards
Well you had mod_fcgid handler there which definitely needs the +ExecCGI
option enabled. But good you figured out you've been using a wrong module
handler.
> --
> Tim
> tim at tee jay forty nine dot com or akwebsoft dot com
> http://www.akwebsoft.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

Re: [users@httpd] apache prints python code rather than executes (fastcgi)

Posted by Tim Johnson <ti...@akwebsoft.com>.
* Igor Cicimov <ic...@gmail.com> [130227 07:11]:
> On 27/02/2013 11:49 AM, "Tim Johnson" <ti...@akwebsoft.com> wrote:
> > new to fastcgi (note: fastcgi is enabled).
> >
> Try adding
> Options +ExecCGI
  Thanks Igor, but that didn't change things (had tried in past)
  regards
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache prints python code rather than executes (fastcgi)

Posted by Igor Cicimov <ic...@gmail.com>.
On 27/02/2013 11:49 AM, "Tim Johnson" <ti...@akwebsoft.com> wrote:
>
> Using apache on Mac OSX 10.7.
> I have a test django application with a executable file named
>
> index.fcgi (permissions = 755)
>
> My .htaccess looks like this :
> #############################################################
> AcceptPathInfo On
> AddHandler fcgid-script .fcgi
> RewriteEngine on
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ index.fcgi/$1 [L,QSA]
> #############################################################
> When I point my browser to the directory in which the file
> is located, the code is printed out, rather than executed.
>
> I'm sure that there are other options to be enabled, but I am brand
> new to fastcgi (note: fastcgi is enabled).
>
Try adding
Options +ExecCGI

> If this is deployed to a website where my domain is hosted, I will
> not have access to apache configuration, thus .htaccess must do
> all the work (if possible).
>
> TIA
> --
> Tim
> tim at tee jay forty nine dot com or akwebsoft dot com
> http://www.akwebsoft.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>