: 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
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.
More posts by @Sherry384
1 Comments
Sorted by latest first Latest Oldest Best
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/
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.