How does Nginx get the variable of url

location /ws/chat/xxx/ {
            proxy_pass http://www.abc.com/ws/chat/xxx/;
        }

for example, xxx is a string, so how do I get this string and use it in proxy_pass

that string is similar to "20,35", which is the number + underscore + number

.

Is that what you want for

?

location ~ /ws/chat/([0-9]+_[0-9]+)/ {
    proxy_pass http://www.fanfei.site/ws/chat/$1/;
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c1d386-3b6fe.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c1d386-3b6fe.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?