Open miaulightouch opened 7 years ago
REICHAT's src is written starts with "//". This is a good way as it is protocol independent.
You can use the rewrite
directive to solve it.
location /paint/ {
rewrite ^/paint(/.*)$ $1 last;
# any other proxy directives...
}
still no luck, as I said, when browser calling socket-io, it still call from host root.
and, your rewrite rule is routing /paint/
to /
, it will show the same thing at /index.htm
Add new subdomain for reichat instance is my personal recommend, thank you.
javascript load object with absolute path not relative path, and cause problem.
ex: I set reverse proxy to reichat in example.com/paint, like below
but script still ask the file from root, like: example.com/socket-io/somefile.js, not: example.com/paint/socket-io/somefile.js