How to setup nginx as a direct proxy by getting destination infos from the url

pg flag

I'm trying to learn if it's possible to use Nginx to proxy my connection to a url so when I browse for "<anyUrl>", nginx takes the <anyUrl> part and proxies my connection to it.

Do you know how can I achieve this?

I've tried using this without success since I can't even contact the example "":

server {
    listen 80;
    server_name *;

    location / {
        proxy_pass http://$host$request_uri;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.