The Listen directive replaced the BindAddress and Port directives in Apache version 2.0 and is now required. It can be used to combine an IP address and a port number that Apache should listen on.
Multiple Listen directives are allowed. For example:
Listen 209.100.100.3:80 Listen 209.100.100.3:443
While these entries would be valid, because we want Apache to listen on all IP addresses, you should not use an IP address here. If you must control the port numbers Apache listens on, specify them using the Listen directive without an IP address, like this:
Listen 80 Listen 443
Then start Apache, and check to make sure that it is listening on the proper ports with this command:
#netstat -apn | more
You should see netstat reporting that Apache is listening on both ports (80 and 443).
Now that we've looked at the general options you can use in the Apache configuration file, let's look at how you create an Apache virtual host.