Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2002
    Sherbrooke, Québec

    Question Apache on multiple ports

    I have Apache listening to both ports 80 and 8080.

    I need each and every site to be accessible through both ports

    That is, and must be the same exact site, but the two ports are required because my network blocks port 80 from some hosts and port 8080 from some other hosts, the visitors have to use either one depending of which one works for them.

    Previously I had the router to redirect calls on 8080 to 80 (Apache was listening only on 80 at the time), but that setting isn't really good now (several changes on the network settings makes the use of that router feature innapropriate).

    Any idea on how to do that without duplicating the <virtualhost> entry for each and every site?

    FYI only one IP is used (and it's not a fixed IP), only one domain name is used (dynamic DNS) with sub-domains for the different sites.

    Thanks in advance

  2. #2
    Join Date
    Jan 2003
    This has been awhile, but try

    <VirtualHost _default_:*>

    You can replace _default_ with an IP and/or * with a port, as needed, but that VirtualHost definition cover all listening points.
    Game Servers are the next hot market!
    Slim margins, heavy support, fickle customers, and moronic suppliers!
    Start your own today!

  3. #3
    Join Date
    Jun 2002
    Sherbrooke, Québec
    Funny. I thought I had tried exactly that last night and it didn't work. Must have been too tired to do it correctly

    I changed * to *:* to get what is below, and it works without a problem: Each and every site works on any interface, any port; With a single * each and every site listen on any interface, but only the first port (which is logical, as the doc says it uses the default port unless stated otherwise).

    Thank you hiryuu for your help

    NameVirtualHost *:*

    <VirtualHost *:*>
    ServerAlias *
    DocumentRoot /home/web
    CustomLog /home/logs/access_log combined
    ErrorLog /home/logs/error_log

Posting Permissions

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