Listen on multiple ports

Discussion in 'Apache' started by wtb41, May 8, 2012.

  1. #1
    I am running apache2-mpm-prefork 2.2.9-10+lenny12 and the Debian configuration scheme. I want Apache to listen on 2 ports: 80 and 50002; so I need these 2 Listen directives:


    Listen 80
    Listen 50002


    I’m hosting only 1 website; so I have the following directives to accommodate port 80.


    NameVirtual Host *:80


    <VirtualHost *:80>
    DocumentRoot /var/www
    etc.
    </VirtualHost>


    What must I do to this latter set of directives to add functionality for port 50002? Would the following work?


    NameVirtual Host *:80:50002


    <VirtualHost *:80:50002>
    DocumentRoot /var/www
    etc.
    </VirtualHost>


    Thanks for your help.
     
    wtb41, May 8, 2012 IP