title: Serving nodejs static files in the same domain as my wordpress WEB-SERVER NGINX
body: <pre><code>server {
  listen 80;
  listen [::]:80;
  servername www.domain.com.br;
  return 301 http://www.domain.com.br$requesturi;
  
  root /var/www/html;
  index index.php index.html index.htm index.nginx-debian.html;
  location / {
  #try_files $uri $uri/ =404;
  try_files $uri $uri/ /index.php$is_args$args;
  }
  
  location ~ \.php$ {
  include snippets/fastcgi-php.conf;
  fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  }
  
  location ~ /\.ht {
  deny all;
  }
  
  location = /favicon.ico { log_not_found off; access_log off; }
  location = /robots.txt { log_not_found off; access_log off; allow all;}
  location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
  expires max;
  log_not_found off;
  }
  location /sistema/ { //RUNNING NODEJS RIGHT HERE
  proxy_read_timeout 600;
  client_max_body_size       500M;
  proxy_pass http://localhost:8080;
  proxy_set_header Host      $host;
  proxy_set_header X-Real-IP $remote_addr;
  
  }
  }
  </code></pre>
  
  <p>I would like to serve my static files or my uploaded files from my NODEJS System through</p>
  
  <p>www.mydomain.com.br/sistema/uploads/path/tofile</p>
  
  <p>www.mydomain.com.br/sistema/views/path/to/views</p>
  
  <p>I am using express.static(__dirname + '/public'); as static folder;</p>
  
  <p>Is there a possibility? I have been trying to set my server blocks, but I get 404 nginx using those url's above.</p>
  
  <p>Thank you,</p>
  
  <p>Enrico Alvarenga</p>