The purpose of your port assignment on the
listen
directive to 81 is unknown to me. You can read about the use of the directive here:
http://httpd.apache.org/docs/current/mod/core.html[
^].
Whenever you make a decision of port assignment, regardless of its application, you should
always refer to this normative document of IANA:
http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml[
^].
See also:
http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers[
^].
IANA is an ultimate authority in Internet assigned numbers, it's directives play the role of the law. Please see:
http://en.wikipedia.org/wiki/Internet_Assigned_Numbers_Authority[
^],
http://www.iana.org/[
^].
According to the IANA document, port 80 is assigned to HTTP, and 81 is "unassigned", so, in principle you can use it now, but in future, nothing can guarantee that this port becomes assigned, and you or your user uses some emerging service on this port in future, and than it will conflict with your application, or your application will conflict with that new
well-known service, that is, the service which starts to listen first will prevent doing so another one — something which you would not want.
Technically, you can use any ports you want, but this is only if you don't care about some
well-known services and applications.
Actually, it depends on your requirements. If, by some reason, you would need to use some random port number (which is very typical thing, but I don't thing a typical for HTTP/HTTPS servers), there are the port number ranges specifically reserved for
User Ports (1024-49151, be used without or prior to IANA registration), and the
Dynamic and/or
Private Ports (49152-65535).
For some further explanations, please see:
http://en.wikipedia.org/wiki/Ephemeral_port[
^].
As you are using Apache, I have no idea why would you want to use the ports other then default 80 (HTTP) or 443 (HTTPS). However, I know that it is needed for some special purposes, so please decide it by yourself. I hope I warned you and explained what's involved.
Good luck,
—SA