Score:0

Using nginx proxy to redirect the content to another website

lb flag

I'm using Ubuntu 18.04 & Nginx for my websites.

I need help with the following question.

Let's say (on the same server) I have the following:

/home/website1/public_html/image_abc.webp

When people are accesing my 2nd website, I want to find a way to show them the image without using it's name, for exemple

/home/website2/public_html/image_abcd.webp 

(I want this to be the same image as from the website1 path) but using other name.

Is this possible?

Thank you!

ChrisNZ avatar
gt flag
I am not sure if there are any Nginx directives that can achieve what you are after, but I believe you might want to look into using a symbolic link (symlink). Maybe something like: ln -s /home/website1/public_html/image_abc.webp /home/website2/public_html/image_abcd.webp
Andrew avatar
lb flag
@ChrisNZ I know it's possible to do that, what I'm interested is if I'm able to use a directory from a path changing it's name without creating a new directory. Thank you for replying anyway!
I sit in a Tesla and translated this thread with Ai:

mangohost

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.