Welcome! Log In Create A New Profile

Advanced

Mono, fastcgi, Nginx config problem for ASP.NET

Posted by skippyV 
Mono, fastcgi, Nginx config problem for ASP.NET
September 02, 2016 08:38PM
Hello,

My Nginx setup works with an index.html file but when I try to create
an 'Default.aspx' file I get
502 Bad Gateway
with "nginx/1.6.3" displayed underneath.

I basically followed these instructions:
http://www.mono-project.com/docs/web/fastcgi/nginx/

and installed mono 4.6 and xsp from source. On CentOS 7.2.

path of "main" conf: /etc/nginx/nginx.conf

my conf file path: /etc/nginx/sites-available/mydomain.com.conf

with a link from /etc/nginx/sites-enabled/mydomain.com.conf to
/etc/nginx/sites-available/mydomain.com.conf

Both the index.html file and Default.aspx reside in the directory:
/var/www/mydomain.com/public_html

When I enter "mydomain.com" in a browser than the index.html page is displayed correctly.
But when I enter "mydomain.com/Default.aspx" then I get the 502 error.

One potential hiccup is when I entered this instruction:
fastcgi-mono-server4 /applications=www.skippyvondrake.com:/:/var/www/skippyvondrake.com/public_html/ /socket=tcp:127.0.0.1:9000
the command prompt never returns

Please point out the mistakes. Trying to do the "right" way of configuring is difficult when so many sights seem to have different conf setups.
Some of them seem to contradict each other.

My Default.aspx file:
====================
<%@ Page AutoEventWireup="true" Language="C#" ContentType="text/plain" %>
<script runat="server">
void Page_Load(object sender, EventArgs e)
{
this.Response.Write("Hello World!");
}
</script>
===================
Attachments:
open | download - mydomain.com.conf (880 bytes)
open | download - nginx.conf (1.6 KB)
open | download - fastcgi_params (1 KB)
Re: Mono, fastcgi, Nginx config problem for ASP.NET
September 03, 2016 10:51AM
EDIT: I tried to make the above "generic" by using the "mydomain.com" instead of "skippyvondrake.com".
So replace one with the other. I didn't mix the two in the conf or commands. "skippyvondrake.com" is my domain.
thanks
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 148
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready