0

I was able to set up nginx with fastCGI end points in a couple of hours but doing so on ubuntu is a bit more involved.

The specific error I am getting is a 500 internal server error. Unfortunately the error.log file is useless in telling me anything as when I access the server ip by browser no entry is written of the access attempt.

I have my nginx.conf configured with the following "server {" block (adapted for ubuntu from the working windows conf.)

added to config 1/9/2k14 by DSL for Ceemee testing

    #fast CGI via go to local host AWS instance, over rides commented out default

    server {
    listen 80;

    #if you want to test via convenient local host name, mapping
    #127.0.0.1 local host ip address to indicated
    #server name should be placed in hosts file so that it can resolve
    #ex: server_name go.aws.ceemee;

    server_name dev1.aws.ceemee.com;

    #whatever the desired root context path is for web contexts/locations
    #this path could be where your user web interface resources re or
    #it could be any where you wish.
    #ex path: root C:/nginx-1.5.8/Apps/CeeMee;

    root /home/ubuntu/CeeMee;

    index index.html;
    #gzip off;
    #proxy_buffering off;

    location / {
               try_files $uri $uri/;
    }

    #For each open endpoint required we need to map a location port
    #add location blocks to fastCGI for each desired end point
    #the indicated "location ~/(some subpath of root) {" specifies the
    # URI that will be mapped to the indicated port to route requests
    #to fastCGI.

    location ~ /Test.* {
    include     fastcgi_params;
    fastcgi_pass 127.0.0.1:9001;
    }

    try_files $uri $uri.html =404;

    } #end of server block.

}

I have that included inside my nginx.conf file. I have NOT set up any symbolic links to any files in "sites-available" and "sites-enabled" (these folders don't even exist in the windows configuration, are they mandatory in the Ubuntu set up??

I did delete the symbolic link to the "default" site in "sites-enabled" and tried to reload...the config, which happened with no errors but trying to access the site again resulted in a 500 internal server error with no error at all in error.log reporting for those accesses (which is annoying).

Community
  • 1
  • 1
David Saintloth
  • 4,061
  • 2
  • 16
  • 16
  • 1
    what's listening on port `9001`? – Mohammad AbuShady Jan 11 '14 at 22:24
  • Did you [set up](http://stackoverflow.com/questions/1706111/where-can-i-find-the-error-logs-of-nginx-using-fastcgi-and-django) an [error log](http://nginx.org/en/docs/ngx_core_module.html#error_log)? – Carsten May 09 '14 at 13:22

0 Answers0