HyperFastCgi icon indicating copy to clipboard operation
HyperFastCgi copied to clipboard

hyperfastcgi in nginx default server

Open maggedotno opened this issue 5 years ago • 0 comments

First: Sorry if this question turns out to be more about nginx and less about hyperfastcgi.

I'm trying to set up nginx with one/default server pointing to hyperfastcgi, thinking that hyperfastcgi can recognize which app to serve based on the incoming URL. Is this possible?

My nginx config has this currently:

server {
        listen 80;

        access_log /var/log/nginx/access.log;
        root /var/www;

        location / {
                aio threads;
                rewrite ^/(.*)/$ /$1 permanent;
                index index.html;
                fastcgi_index index.aspx;
                fastcgi_keep_conn on;
                fastcgi_pass fastcgi_backend;
                include /etc/nginx/fastcgi_params;

                fastcgi_split_path_info ^((?U).+\.as.x)(/?.+)$;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }
}

...as you can see my root dir in nginx was meant to be just a dummy, but since SCRIPT_FILENAME uses it, it means that this config only gives me 404s. I tried commenting out the SCRIPT_FILENAME line with no different result.

maggedotno avatar Oct 30 '18 09:10 maggedotno