1

I am trying to install and run hygieia https://github.com/hygieia/hygieia on a linux server however it did not work. I start UI in port 3000 and api in port 4000 and configure them in nginx with the nginx.conf file below :

events {
         worker_connections  1024;
   }
http {
        include       mime.types;
        default_type  application/octet-stream;
        sendfile        on;
        keepalive_timeout  65;
        server {
                   listen       3000;
                   server_name  localhost;
       location / {
                  root   html/hygieia-ui;
                  index  index.html index.htm;
     }
      error_page   500 502 503 504  /50x.html;
     location = /50x.html {
        root   html;
    }
    location ^~/api/{
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://localhost:4000;
    } 

And when I try to visit UI through port 3000 with browser ,after the rotation page , it flashes across the "Verifying Identity" page and main UI page , then finally stays at http://serverip:3000/authcode with error, and it behaves the same whether starting api or not :

1.error in browser: http://serverip:3000/authcode 404 Not Found

2.error in nginx: [error] 4711#0: *12 open() "/usr/local/nginx/html/hygieia-ui/authcode" failed (2: No such file or directory), client:mypcip, server: localhost, request: "GET /authcode HTTP/1.1", host: "serverip:3000", referrer: "http://serverip:3000/user/sso"

what I have known and tried:

1.Same configuration works fine for my PC of Windows 10 system(including port , nginx configuration etc);
2.Mongo db has been started and curl localhost:4000/api/ping returns true ;    
3.Visiting access of port 3000 and 4000 from my PC to the linux server has been granted , and visiting serverip:4000/api/ping
with my browser returns true as well;   
4.curl localhost:3000 on linux server returns the content of index.html;

And I noticed that there is not any http request log regarding authcode in my PC's nginx access log, however it occurs in the log of linux server as below:

mypcip - - [21/Jun/2021:02:39:57 -0400] "GET /authcode HTTP/1.1" 404 555 "http://serverip:3000/user/sso" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36 Edg/91.0.864.48"

Apps version I am using:

Nodejs: v14.17.0 Npm: v6.14.13
Angular: v8.0.3
Nginx: v1.20.1
Java: openjdk v1.8.0_292 Maven: v3.6.3

Any help will be much appreciated ! Thanks a lot !

0 Answers0