Same web service running on different network interface

0

Can I configure a web service, on linux ubuntu server 12.04, to be accessed by two different network interfaces on different networks?

For example:

My server eth0 is accessed by one subnetwork and its computers can use the web service. My server eth1 is configured with another IP subnetwork, then can't to use the web service.

That's the point, how can I make two different subnetworks access the same service, avoiding this subnetworks to see each other?

user1589169

Posted 2014-05-15T18:06:20.683

Reputation: 1

Isn't this a simple matter of making sure the server software (daemon) that manages or provides the service binds to both interfaces. What software are you using? – RedGrittyBrick – 2014-05-15T18:20:00.633

I don't know yet, one of the service is hg mercurial. – user1589169 – 2014-05-15T18:24:23.210

you mean configure my apache to bind the two interfaces? – user1589169 – 2014-05-15T18:46:21.400

Answers

0

For Hg Mercurial you make sure the configuration file allows the web service to bind to all available network interfaces

web

Web interface configuration. The settings in this section apply to both the 
builtin webserver (started by hg serve) and the script you run through a 
webserver (hgweb.cgi and the derivatives for FastCGI and WSGI).

...

The full set of options is:

address
  Interface address to bind to. Default is all.

RedGrittyBrick

Posted 2014-05-15T18:06:20.683

Reputation: 70 632

The only setting changed is: web.push_ssl=NO. It is not a public repository. – user1589169 – 2014-05-15T19:13:59.940

On the second network client side, ping and ssh succeeds, but when trying to clone, I got the "abort error: Network is unreachable" message, even when changing the hg address only to the eth1 IP. – user1589169 – 2014-05-15T20:12:46.257