ASP.NET pages with nginx
Maxim Dounin
mdounin at mdounin.ru
Sun Mar 2 13:10:08 UTC 2014
Hello!
On Sun, Mar 02, 2014 at 05:32:43AM -0500, pumiz wrote:
[...]
> and the output I get is
>
> -------------------------------------------------------
> No Application Found
>
> Unable to find a matching application for request:
>
> Host 10.75.2.5
> Port 80
> Request Path /Default.aspx
> Physical Path /home/pi/var/www/Default.aspx
> -------------------------------------------------------
>
>
> Please find below all my files.
> Could you please help me to find out what i am missing to get this simple
> page up and running?
> _____________________________________________________________________________________________
>
> my /etc/nginx/sites-available/default file is as follows:
>
> server {
> listen 80;
> server_name localhost;
>
> location /{
> root /home/pi/var/www/;
> index index.html index.htm default.aspx Default.aspx;
>
> include /etc/nginx/fastcgi_params;
> fastcgi_index Default.aspx;
> fastcgi_pass 127.0.0.1:9000;
> }
> }
>
> _____________________________________________________________________________________________
> my /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_FILENAME $document_root$fastcgi_script_name;
In your fastcgi_params the SCRIPT_FILENAME param is set multiple
times, and at least one of the values ($request_filename) is
wrong for the configuration used.
I would recommend you to revert all the modifications to
fastcgi_params, and use
root /home/pi/var/www/;
location / {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index Default.aspx;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
in the configuration instead. Alternatively, use "fastcgi.conf"
as available for simple configurations, it already has
SCRIPT_FILENAME set:
root /home/pi/var/www/;
location / {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index Default.aspx;
include fastcgi.conf;
}
--
Maxim Dounin
http://nginx.org/
More information about the nginx
mailing list