How can I configure nginx for load balancing Rserver

I am a beginner, I have deployed two Rserver and tried load balancing with nginx server.
However, during the configuration process, I was unable to correctly redirect my access to the nginx server address to the backend server.
How do I configure nginx. conf? Is there a configuration guide website or template?thx a lot.