Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Handling http requests on port 80 by two different services

    On my server there's Apache web, and also a CRM system that has a web interface.

    I'd like to access my Apache webs via, but reserve specific.domain.address:80 to be handled by the CRM system.

    Since both web servers can not sit on the 80th port simultaneously (or can they?), I thought I could configure the CRM webserver to handle requests on some other port, say, 8080, and configure Apache so that requests to specific.domain.address:80 are internally redirected to localhost:8080.

    How I could make this setup?

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Possible, but I wouldnt add such a proxy config to apache because that introduces unneeded dependency and complexity.

    What webserver does this crm use?
    If it would also be apache, then itīs just a matter of writing a combined apache conf and run one apache instance.

    If there are two different webservers -and if they need to stay different- then you can separate by ports, as you already mentioned.
    Should be possible, but needs testing.

    Probably the fastest option is to separate by IP.
    Run one webserver on one IP, the second on another.

    Yet another solution is to have a proxy or loadbalancer type service in front of apache/cms and let this do the separation.

    My suggestion would be IP separation.
    You must always face the curtain with a bow.

  3. #3
    Depending if you need the different webinterfaces only for the local network or if they should be accessible via internet and maybe even through firewalls different measures can be taken:
    1. for use only in the local network separation by port number is the easyest to configure and in most cases sufficient
    2. a 2nd IP-adress is harder to configure (virtual networkadapter needed)
    3. If different webinterfaces should be acessible via internet with only one maybe dynamic IP-address only separation by URL is possible to do this you need the apache mod-proxy reverseproxy. With this your apache will proxy contents of other webinterfaces or servers on the localhost or anywhere else in the LAN or internet whenever another extension of the URL is used.

    f.e.: - apache has url ,if this url is used apache will serve its own content
    . - a reverseproxy is configured for in the apache-config for localhost:8080, if this URL is used apache will proxy the content of the webif running on port 8080.
    . - a reverseproxy is configured for in the apache-config for, if this URL is used apache will proxy the server from the port 80 of the computer with the IP-address in the local network.
    . - a reverseproxy is configured for in the apache-config for, if this URL is used apache will even proxy google (this could be interesting to proxy locationdependent services of your homelocation regardless from what country you access your apache).


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts