Closed o3o closed 4 years ago
On Mon, Aug 03, 2020 at 03:19:36PM -0700, o3o wrote:
location / { include scgi_params; scgi_pass localhost:8080; }
So, I start app
./arsd_cgi --port 8080
when I open
localhost:8080
in my browser:
So you should be going to your nginx thing in the browser (maybe http://localhost/ or whatever, depends what port that's running on).
What you're doing here is trying to go directly to the scgi server in the browser itself, but the browser speaks http, not scgi. So every connection gets various protocol errors there.
With a config like this, you talk to nginx in the browser, then nginx talks to your cgi application on the backend through scgi.
Thank you for your reply.
Do you have an idea how to set up nginx?
You basically did it right, you just need to actually go to the nginx port in your browser instead of the backend port.
On my system the config looks like this:
server {
listen 80;
location / {
include scgi_params;
scgi_pass localhost:9001;
}
}
So I go to port 80 in the browser (which is the http default) to use the website. If you put a listen 7000;
in there, for example, you'd want to go to to http://localhost:7000/
in the browser.
It works like a charm! Thank you for your support and and for your great contribution to community.
My code:
My dub.sdl
I use nginx, my nginx.conf
So, I start app
when I open
localhost:8080
in my browser:Thank you very much