I use nginx as a static file server just as the wiki illustrates. And I added a log to monitor what kind of requests goes to NodeBB server.
location ~ ^/(images|sounds|templates|uploads|vendor|src\/modules|nodebb\.min\.js|stylesheet\.css|admin\.css) {
root /path/to/nodebb/public/;
try_files $uri $uri/ @nodebb;
}
location / {
access_log /var/log/nginx/access3.log;
proxy_pass http://io_nodesss;
}
I found that some of requests of the static files are still going to NodeBB:
"GET /src/modules/composer/preview.js?d7bd0222-d024-4aba-869d-0b088e7d5ba1 HTTP/1.1" 200 772
"GET /src/modules/composer/uploads.js?d7bd0222-d024-4aba-869d-0b088e7d5ba1 HTTP/1.1" 200 2539
"GET /src/modules/composer/drafts.js?d7bd0222-d024-4aba-869d-0b088e7d5ba1 HTTP/1.1" 200 492
And I checked that those files are not in ./src/modules, they are at ./node_modules/xxxx/static/ instead.
Is there any solution to this? Don't tell me that I should copy those files to /src/modules/ manually.