Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun May 29, 2011 9:47 pm 
Offline

Joined: Wed Nov 25, 2009 9:03 pm
Posts: 1
I am looking to replace Apache with nginx to run MovableType. For right now, I am setting this up on a virtual machine on my local PC. I have Debian 6.0.1/Squeeze installed. I followed the Linode instructions to get Perl and FastCGI working.

I am using the Movabletype installation from Debian, which is stored in /usr/lib/cgi-bin/movabletype. I would like to keep this centralized location and be able to host different instances via different MT variables like I had done with Apache.


I have /mt aliased to /usr/lib/cgi-bin/movabletype, but I can't seem to get it working correctly. I have tried a lot of different configuration, which gave me either the source of the cgi file or simply "403". Here is what I'm currently working with. I know it's probably horribly wrong. If all else fails, I know I could use nginx to host the static files and have it pass administration stuff to Apache, but any help getting it to run on nginx would be greatly appreciated :] Thanks!

nginx server config
Code:
server { 
  listen 80;
  server_name 192.168.1.87;
  access_log /srv/www/default/logs/access.log;
  error_log /srv/www/default/logs/error.log;
  root /srv/www/default/htdocs;

  location / {
    index index.html index.htm
 }

  location ^~ /mt {
    alias /usr/bin/cgi-bin/movabletype;
    location ~ \.cgi$ {
      gzip off;
      fastcgi_pass unix:/var/run/fcgiwrap.socket;
      fastcgi_index mt.cgi;
      fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin/movabletype$fastcgi_script_name;
      fastcgi_param MT_HOME /usr/lib/cgi-bin/movabletype;
      fastcgi_param MT_CONFIG /usr/lib/cgi-bin/movabletype/mt-config;
      }
  }

  location ~ \.pl$ {
    gzip off;
    include /etc/nginx/fastcgi_params;
    fastcgi_pass unix:/var/run/fcgiwrap.socket;
    fastcgi_index index.pl;
    fastcgi_param SCRIPT_FILENAME /srv/www/default/htdocs$fastcgi_script_name;
  }
     
    }
  }

error.log
Code:
2011/05/29 21:36:35 [error] 7208#0: *22 FastCGI sent in stderr: "Cannot get script name, is DOCUMENT_ROOT and SCRIPT_NAME set and is the script executable?" while reading response header from upstream, client: 192.168.1.102, server: 192.168.1.1.87, request: "GET /mt/mt.cgi HTTP/1.1" , upstream "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "192.168.1.87"


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group