Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i in my wamp i changed listen:80 to listen:81 httpd.conf file and my index.php works fine. My question is am i working in correct way? Is the process right?
Posted
Updated 13-Nov-12 17:37pm
v2
Comments
Sergey Alexandrovich Kryukov 13-Nov-12 23:41pm    
Why?
--SA

1 solution

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
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900