Closed robcza closed 7 years ago
Hey robcza, So this sounds to me like an issue with the NGINX configuration. If 127.0.0.1:8000 is the interface and port that NGINX is configured to run on, and the root directory is configured correctly in NGINX, at minimum you should at least see the web interface. The issue might also be a conflict in the ports being used. By default, the GOSINT binary is configured to use 127.0.0.1:8000, so if you haven't changed that (which is configured with a flag on startup), then NGINX most likely is not able to bind to that port/interface and erroring out. I would make sure that NGINX and GOSINT are not using the same interface/port (whichever one you alter doesn't matter, they just can't be the same) and check the NGINX error logs to see if there are any issues in there that need to be addressed.
As a quick test to ensure the GOSINT binary is working, you can try and navigate to http://127.0.0.1/api/pre/ with the default config and see if you get a JSON response from the GOSINT API. We plan on updating the documentation more with information explaining all the API endpoints and their uses.
Similar issue
2017/08/17 03:26:28 [error] 22130#22130: 54 connect() failed (111: Connection refused) while connecting to upstream, client: ###.###.###.###, server: someserver.yourcompany.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "##.##.##.##" 2017/08/17 03:26:28 [error] 22130#22130: 54 open() "/usr/share/nginx/html/50x.html" failed (2: No such file or directory), client: ###.###.###.###, server: someserver.yourcompany.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "##.##.##.##"
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:8000 0.0.0.0: LISTEN 29682/gosint tcp 0 0 127.0.0.1:27017 0.0.0.0: LISTEN 14113/mongod tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN 1341/sshd tcp 0 0 0.0.0.0:443 0.0.0.0: LISTEN 31151/nginx -g daem tcp6 0 0 :::22 :::* LISTEN 1341/sshd
{"message":"none found"}
I hope the above information help to find the issue and suggest the correction actions to resolve it
It seems on my side it was really just a trivial issue as the website din't have the source files available. Working for me now. I will go with PR: https://github.com/robcza/GOSINT/commit/ac9027a50b5bdc86519c26a2782c32f0a9dd69a8
I had to copy the website source codes to a directory accessible to nginx
sudo mkdir /var/www/gosint
cp -r /home/gosint/projects/src/GOSINT/website/* /var/www/gosint/
And change the nginx configuration for root directory accordingly: root /var/www/gosint;
server {
ssl_certificate /etc/nginx/ssl/nginx.crt;
ssl_certificate_key /etc/nginx/ssl/nginx.key;
listen 443 ssl;
root /var/www/gosint;
index index.php index.html index.htm;
try_files $uri $uri/ @apachesite;
server_name someserver.yourcompany.com;
gzip on;
gzip_proxied any;
gzip_types
text/css
text/javascript
text/xml
text/plain
application/javascript
application/x-javascript
application/json;
#location / {
# try_files $uri $uri/ =404;
#}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location @apachesite {
auth_basic "closed site";
auth_basic_user_file /etc/nginx/.htpasswd;
proxy_pass http://localhost:8000;
}
location ~ \.php$ {
auth_basic "closed site";
auth_basic_user_file /etc/nginx/.htpasswd;
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
I have the same problem, but the solution of the problem proposed by @robcza did not help.
I have the same problem, but the solution of the problem proposed by robcza did not help.
Confirm that this is the right location on your setup for the php fpm sock file.
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock
@Jsitech I have the same location
have same issue, move to docker and it work ok.
Hello all,
In the latest commits we have provided bash install scripts which come with pre-configured NGINX configurations to avoid this issue. You can find instructions for use at gosint.readthedocs.io/en/latest/installation.html.
Another note, to load the GOSINT dashboard, http://localhost/
or http://127.0.0.1
is the correct URL to load with the default installation.
As @blueteam1 mentioned, if you are able to load an API response from http://localhost/api/pre/
and get a JSON response of {"message": "none found"}
then GOSINT is successfully installed and it is an issue with NGINX configuration (which again should be resolved with the latest updates).
If you are still having issues please open a new issue.
Thanks!
i had the same issue,make sure you start "service php7.0-fpm" as well.It works fine after that.
I've followed the installation guide step by step, however ended up unable to open the web application itself. Machine is Ubuntu 16.04.02 64bit Seems that gosint starts ok:
The web application is not found:
I guess I'm missing something trivial and I'd like to adjust the install guide.