Mobile app version of vmapp.org
Login or Join
Sherry384

: Can I run Nginx and Node.js on same dedicated server? I have one dedicated server and I do have more than 1 IP address. Could I run Nginx, Apache, LIGHTTPD and Node.js simultaneously? I

@Sherry384

Posted in: #Webserver

I have one dedicated server and I do have more than 1 IP address.

Could I run Nginx, Apache, LIGHTTPD and Node.js simultaneously?

I want to make tests, learn.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sherry384

1 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

You can attach each of the servers to a different IP address of the same computer. There are configuration directives for each that will do so.

Apache

Listen: httpd.apache.org/docs/2.4/bind.html
Nginx

Listen: nginx.org/en/docs/http/ngx_http_core_module.html#listen
Lighttpd

server.bind: redmine.lighttpd.net/projects/1/wiki/Server_bindDetails
node.js

server.listen(): nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback


However, the typical way to do this is to use a single server with one IP address. You would use either Nginx or Apache as the main server (they are the most capable).

You run the various servers on different ports. The non-standard ports (except the main server on port 80) would be firewalled and not accessible except locally. The main server would reverse proxy content from other ports for various virtual hosts.


Apache: httpd.apache.org/docs/2.4/howto/reverse_proxy.html Nginx: www.nginx.com/resources/admin-guide/reverse-proxy/

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme