ok eu finalmente fiz isso funcionar. Eu ainda tenho outro problema, o índice não funciona Então eu tenho que digitar o endereço completo:
se eu apenas digitar:
então eu tenho um erro 404 (então url faz distinção entre maiúsculas e minúsculas)
Como eu disse agora, o fastcgi funciona, as coisas ainda são obscuras e eu tenho que melhorar isso. De qualquer forma, eu te dou toda a minha configuração, espero que isso ajude alguém:
SO: rapbian 3.18.11 (debian) Mono: 4.0.2 fastcgi-server4 nginx 1.2.1
FastCGI
arquivo de configuração:
<apps>
<web-application>
<name>ptitest</name>
<vhost>*</vhost>
<vport>8045</vport>
<vpath>/</vpath>
<path>/usr/share/nginx/asproot</path>
</web-application>
</apps>
linha de comando:
CONFIG_PATH=/usr/share/nginx/fastcgimono
LOG=/var/log/fastcgi-mono4.log
MONOSERVER=$(which fastcgi-mono-server4)
${MONOSERVER} /appconfigdir=${CONFIG_PATH} /socket=tcp:127.0.0.1:9000 /logfile=${LOG} --verbose &
NGINX:
/ etc / nginx / fastcgi_params
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param HTTPS $https;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
fastcgi_param PATH_INFO "";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
site-avalaible / default (eu fiz tantas tentativas, aqui o que é agora):
server {
listen 8045;
server_name ptitest;
root /usr/share/nginx/asproot;
access_log /var/log/nginx/asp.access.log;
error_log /var/log/nginx/asp.error.log;
location ~ \.(aspx|asmx|ashx|asax|ascx|soap|rem|axd|cs|config|dll)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_intercept_errors on;
}
location / {
root html;
index index.html index.htm default.aspx Default.aspx;
}
}
Conteúdo da Web: /usr/share/nginx/asproot/web.config:
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
/usr/share/nginx/asproot/Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<div>
<% var test = String.Format("Hello World! Got an aspx page running on nginx!!!\r\n{0}",System.DateTime.Now); %>
<%= test %>
</div>
</body>
</html>
Registros