Why does my CppCMS application not run with FastCGI configuration?
Brought to you by:
artyom-beilis
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.
Anonymous