Answer the question
In order to leave comments, you need to log in
How to properly configure Nginx to redirect static from nodejs?
Tell me how to fix the settings so that static from nodejs is given to nginx, due to the fact that there is such a rule
location ~* ^(?!/phpmyadmin/).+\.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|xml|docx|xl$
access_log off;
expires 30d;
}
#перенаправление на NodeJS
location /node/ {
#ip:порт nodeJS
proxy_pass http://127.0.0.1:8000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
#остальное отдается апачу
// Routing
app.use(express.static(__dirname + '/public'));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question