Menu

#23 Why does my CppCMS application not run with FastCGI configuration?

Unstable_(example)
open
nobody
None
1
2018-09-17
2018-09-17
fi la
No

I follow this tutorial to create my sample application CMS00 on my Ubuntu machine. This is added to the NginX server block of /etc/nginx/sites-available/default:

location ~ ^/CMS00.*$ {
    fastcgi_pass    127.0.0.1:8080;
    fastcgi_split_path_info ^(/CMS00)((?:/.*))?$;  
    fastcgi_param   PATH_INFO       $fastcgi_path_info;  
    include         fastcgi_params;
}

Then I use this config.js file:

{  
  "service" : {  
    "api" : "fastcgi",
    "ip": "127.0.0.1",
    "port" : 8080
  }  
}

And then added the path with:

export LD_LIBRARY_PATH=/usr/local/lib

When I try to run it:

./CMS00 -c config.js

Nothing comes on. However if I change config.js to:

{  
    "service" :
    {  
        "api" : "http",  
        "port" : 8080  
    },  
    "http" :
    {  
        "script_names" : [ "/CMS00" ]  
    }  
}

It runs properly. Could someone tell me what I did wrong with the FastCGI configuration? Thank you so much.

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.