Hello,
I'm trying to add virtual path to a site and redirect it to the same content as the root.
This is the config I have at the moment:
server {
listen 80;
listen [::]:80;
server_name url.example.com;
root /var/www/url.example.com/path1/path2;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
I like to make it when the user using the url url.example.com/foo/bar/ it will display the same website as in /
I've tried several options I saw online, but none worked.
Any idea how can I get there?
Thanks!!
I'm trying to add virtual path to a site and redirect it to the same content as the root.
This is the config I have at the moment:
server {
listen 80;
listen [::]:80;
server_name url.example.com;
root /var/www/url.example.com/path1/path2;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
I like to make it when the user using the url url.example.com/foo/bar/ it will display the same website as in /
I've tried several options I saw online, but none worked.
Any idea how can I get there?
Thanks!!