How to use nginx reverse proxy

I’m trying to send certain websites to other websites, using nginx, and also send a few specific urls to other ones, specifically I want to change the port. Basically since I want to use nginx, I need specific urls to images sent to port 81 instead of 80 because the apache server is running on 81 and nginx on 80 and I use the urls for parts or home assistant. I thought I could make a certain directory the other port so their both on port 80. I also have a website I’m trying to redirect to another website because my brother is going to sites he should not and my mom asked. He’s 6.