C
C
camradee2022-03-23 17:29:46
Nginx
camradee, 2022-03-23 17:29:46

How to configure nginx to make a project a subdirectory of another project with language support?

Added a nuxt project to the existing one as a subdirectory. The config is:
location /posts/ {
expires $expires;

proxy_pass 127.0.0.1:5500 ;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1m;
proxy_connect_timeout 1m;
}
But I need languages ​​to work: ...../en/posts
I'm trying to do something like location ~* ^/(et|en|fi|se|ru)?\/posts/ but it doesn't even work

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question