nginx and movabletype on Debian 6
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
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
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"