How to configure apache to listen ONLY to a domain:port ?

  • Hi, I would like apache to listen ONLY to a spcific domain : port.
    Here is what I have in my httpd:conf:



    DocumentRoot /var/wwwServerName
    servername



    This being the virtual server serving my pages for my domain..

    What should I add in this file so apache will NOT listen to anything else than http://www.mydomain.fr on port 80 (for example I don't want it to listen to another domain I have on the server).


    Right now, apache listen to every domain on port 80.
    Thanks,

    [Edited by Sharg on 01-27-2001 at 06:42 AM]


  • I would use either 8080 or 8888, those are the most common, and aren't in use already.


  • Oh, and is there a way to know which ports are used by what ? (in case port 99 is not free) ?


  • yeah I am fairly certain.

    All APACHE directives are hierarchical.

    The definition of port 80 in the virtual host directive should take precedence over 99 for that virtual host only.


  • Thanks guys :)


  • Well it doesn't work.
    I set

    # Port: The port the standalone listens to. For ports < 1023, you will
    # need httpd to be run as root initially.

    Port 8888

    and have the virtual server as shown above, all it do is say it can't find server from browser (of course I did restarted apache).

    Do you have a clue why ?


  • Oh, and is there a way to know which ports are used by what ? (in case port 99 is not free)

    I am sure there is a simple way of doing a recon of broadcast ports- I don't know it-

    Ones to avoid 25 41 43 and 3306 for mysql

    Just be caerful not to broadcast on the same port as your control panel for example.

    Common 'extra' httpd ports 81 99 8888 9999


  • httpd.conf

    # Port: The port the standalone listens to. For ports < 1023, you will
    # need httpd to be run as root initially.

    #Port 80
    #Only port 99 by default

    Port 99



    Does that look ok?


  • This means apache will listen to all incoming request to port 99, but to port 80 only for http://www.mydomain.fr because the virtual server tells it to ?

    Thanks,


  • Cool, i'm gonna to try this :) thanks.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about How to configure apache to listen ONLY to a domain:port ? , Please add it free.