certsocietegenerale/FIR

Missing API

Closed this issue · 3 comments

The API seems to be missing. When I navigate to https://servername/api, I get a

Not Found: The requested URL /api was not found on this server.

Everything else works. I've been running FIR for some time in production mode and just upgraded it to the latest version using the standard git pull & migrate procedure. Any idea how to get the API?

Are you running this behind Nginx? Care to share your nginx config?

I am. I started to look at the Nginx config and thought maybe I needed another static entry, but couldn't figure out where to point it. System isn't public, so I'm not overly concerned about posting the config. Removing some non-essential entries like SSL, etc.

upstream fir {
    server unix:///opt/FIR/run/fir.sock;
}
server {
    listen 80 default_server;
    rewrite        ^ https://$server_name$request_uri? permanent;
    }

server {
    listen 443 ssl;

server_name server.ourdomain.com;  # edited to protect the innocent
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;

    location / {
        uwsgi_pass fir;
        include /opt/FIR/run/uwsgi_params;
    }

    location /static/ {
        alias /opt/FIR/static/;
    }
}

Fixed. I made the mistake of not renaming the plugins directory to installed_apps.txt. Renamed, manage.py executed, restarted, and all is fine!