NGINX giving 404's, never proxy passes to fastcgi-mono-server4

64 Views Asked by At

Working on getting a skeleton of ASP.Net application running on Ubuntu. Installed all the requisite applications. Just trying to serve index.html or index.aspx to start. However, running through Nginx never seems to get through the proxy, always get a 404 from Nginx itself.

Starting mono server as:

fastcgi-mono-server4 /loglevels=All /printlog /verbose /applications=/:/opt/esoa /socket=tcp:127.0.0.1:9000

Nginx configuration:

server {
            listen 80;
            server_name _;

            location / {
                    root /opt/esoa;

                    index index.html;
                    access_log /var/log/nginx/esoa.log;

                    fastcgi_param SERVER_NAME $host;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    fastcgi_param PATH_INFO "";

                    fastcgi_pass 127.0.0.1:9000;
                    include /etc/nginx/fastcgi_params;
            }
    }

Output from Mono server when it starts:

6611: 1 fastcgi-mono-server [2023-01-27 01:34:35.980188] Debug  : fastcgi-mono-server4
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:35.987638] Debug  : Uid 1000, euid 1000, gid 1000, egid 1000
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:35.988138] Debug  : Root directory: /home/ubuntu/test
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:35.989834] Notice : Adding applications '/:/opt/esoa'...
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:35.990535] Notice : Registering application:
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:35.990600] Notice :     Host:          any
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:35.990651] Notice :     Port:          any
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:35.990701] Notice :     Virtual path:  /
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:35.990765] Notice :     Physical path: /opt/esoa/
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:36.005144] Debug  : Parsed tcp:127.0.0.1:9000 as URI tcp:127.0.0.1:9000
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:36.027285] Debug  : Listening on port: 9000
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:36.027847] Debug  : Listening on address: 127.0.0.1
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:36.031714] Debug  : Max connections: 1024
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:36.031817] Debug  : Max requests: 1024
 6611: 1 fastcgi-mono-server [2023-01-27 01:34:36.031973] Debug  : Multiplex connections: False
 6611: 3 fastcgi-mono-server [2023-01-27 01:34:36.036418] Debug  : Server started [callback: Mono.WebServer.FastCgi.ServerProxy]

Simple wget never shows traffic to Mono server:

ubuntu@ip-XXX-31-XXX-XXX:~$ wget http://127.0.0.1/index.html
--2023-01-27 01:51:58--  http://127.0.0.1/index.html
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2023-01-27 01:51:58 ERROR 404: Not Found.
1

There are 1 best solutions below

0
On

Duh, there was another server entry in the nginx.conf that seemed to cancel mine out.