Installing Nginx in front of node.js on local windows 7 -


I have a node The JS server is running locally on Windows 7 and adding the Nginx server to run stable files. After downloading and removing Nginx, when I run nginx.exe, Nginx is only accessible to the nodes inside the nginx folder.

How can I run it automatically and access the node globally? Going to different tutorials, they describe the configuration for Linux, but I think the difference in the .conf file? If so, what are they?

Edit

Using express.js I am getting 404 while trying to serve a CSS file ... here Request URL: 127.0.0.1:3000/ Public / CSS / Style.css and here is the config file:

  worker_processes 1; Event {worker_connections 1024; } Http {include mime.types; Default_type application / octet-stream; Server_names_hash_bucket_size64; Send file on; Keepalive_timeout 65; Server {0.0.0.0:80; Server_name localhost; Access_log path_to_log; Location / {proxy_set_header X-real-IP $ remote_edder; Proxy_set_header X-Forward- $ proxy_add_x_forwarded_for; Proxy_set_header host $ http_host; Proxy_set_header X-NginX-Proxy True; Proxy_pass http://127.0.0.1:3000/; Proxy_redirect closed; } Place ~ * ^. (.jpg | jpeg | gif | css | png | js | ico | xml] $ {# access_log off; root path_to_local_folder_with_static_files; 15d expires;}}  


Comments