Sean-Der / fail2web

a fail2ban GUI powered by fail2rest
536 stars 48 forks source link

404 page not found after install #29

Closed matlink closed 9 years ago

matlink commented 9 years ago

Hey, I justed installed fail2rest and fail2web, but fail2web cannot acces fail2rest, here is the error I got : Unparseable error when attempting to contact fail2rest When I open a ssh-tunnel to the server on the port 5000, and try to connect directly to the API, I got this error : 404 page not found Is there any path the the API I can test to be sure that fail2rest is working correctly ?

Nginx config :

        location /fail2web {
                    index index.html;
                    alias /var/www/fail2web/web;
                    if ($scheme = http) {
                                rewrite ^ https://$server_name$request_uri? permanent;
                     }
        default_type text/html;
        }

        location /fail2web/api/ {
                proxy_pass http://127.0.0.1:5000/;
                proxy_redirect off;
        }

I also changed /var/www/fail2web/web/config.json for :

         {
            "APIRoot": "/fail2web/api/"
          }
matlink commented 9 years ago

Working with a subdomain instead of a subfolder.