Now when do I specify port number at the time of installing web server on OS or at the time of loading application on web server ?
During web server installation.
Can a web server have more than one application ? If yes, how would the server understand where direct request for an application ?
Yes it can have many. The application is determined using the context path and the mappings you have.
You can find more info at the
Apache site Hope this helps