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



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

i have node.js server running locally on windows 7 , add together nginx server serve static files. after downloading , extracting nginx, when run nginx.exe, nginx accessible node within nginx folder.

how can create run automatically , accessible globally in node? going on various tutorials, describe configuration linux assume there differences in .conf file? if so, they?

edit

using express.js maintain getting 404 when trying serve css file... here request url: 127.0.0.1:3000/public/css/style.css , here config file:

worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 64; sendfile on; keepalive_timeout 65; server { hear 0.0.0.0:80; server_name localhost; access_log path_to_log; location / { proxy_set_header x-real-ip $remote_addr; proxy_set_header x-forwarded-for $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 off; } location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ { # access_log off; root path_to_local_folder_with_static_files; expires 15d; } }

node.js nginx localhost

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -