Yacy behind Nginx

  • Everything working, expect peering!

The "System Status" shows under Address:
Host: []:8090 | SSL: enabled (port: 8443)
Publicaddress: http: //yacy.x.x:8090 not 80`

  • I can not peer other servers.

You cannot be reached from outside. A possible reason is that you are behind a firewall, NAT or Router. But you can search the internet using the other peers’ global index on your own search page. We encourage you to open your firewall for the port you configured (usually: 8090), or to set up a ‘virtual server’ in your router settings (often called DMZ). Please be fair, contribute your own index to the global index.

I 2023/11/09 10:48:57 YACY * PeerPing: myType is junior
I 2023/11/09 10:48:57 YACY * PeerPing: I am accessible for 0 peer(s), not accessible for 18 peer(s).
I 2023/11/09 10:48:57 YACY * publish: disconnected senior peer 'agent-galonan-w-0' from [92.189.67.70]: peer ping to peer resulted in error response (added < 0)
I 2023/11/09 10:48:57 YACY * yacyClient.hello result error: result null
I 2023/11/09 10:48:57 YACY * yacyClient.hello thread 'PublishSeed_agent-galonan-w-0', peer http:// 92.189.67.70:8090/; exception: Client can't execute: timout to client after 30000ms for url http:// 92.189.67.70:8090/yacy/hello.html, timeout=30000, duration=30001, concurrent=true, url=http:// 92.189.67.70:8090/yacy/hello.html
I 2023/11/09 10:48:57 YACY * publish: disconnected senior peer 'agent-hitodud-w-16' from [208.107.110.147]: peer ping to peer resulted in error response (added < 0)

  • Nginx Proxy

server {
listen 80;
listen [::]:80;
server_name yacy.x.x;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
client_max_body_size 100M;
client_body_buffer_size 1m;
proxy_intercept_errors on;
proxy_buffering on;
proxy_buffer_size 128k;
proxy_buffers 256 16k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_max_temp_file_size 0;
proxy_read_timeout 300;
proxy_pass http://192.x.x.x:8090;
}
}

Copied from YaCy’s Docker image behind NGINX

  • yacy/SETTINGS/yacy.conf

staticIP=yacy.x.x
javastart_Xmx=Xmx1200m
publicPort=80

I remember, it was discused at github. Don’t know, if it’s solution for you as well…

Thanks.

Could not find out what is wrong till now… :frowning:

Publicaddress: http: //yacy.x.x: 8090`

The port 80 is set (publicPort=80) in the config, but always switching back to 8090

server {

listen 8090;
listen [::]:8090;
server_name yacy.xxxx.xx;

location / {

       proxy_set_header Host $http_host;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto $scheme;

       client_max_body_size 100M;
       client_body_buffer_size 1m;
       proxy_intercept_errors on;
       proxy_buffering on;
       proxy_buffer_size 128k;
       proxy_buffers 256 16k;
       proxy_busy_buffers_size 256k;
       proxy_temp_file_write_size 256k;
       proxy_max_temp_file_size 0;
       proxy_read_timeout 300;

       proxy_pass http://192.168.xxx.xxx:8090;
}

}

1 Like

Great!
I’m thinking of… if it works, wouldn’t you write/compile mini-howto for the docs section?