Click here to Skip to main content
13,190,932 members (54,476 online)
Rate this:
Please Sign up or sign in to vote.
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 13-Nov-12 16:31pm
Updated 13-Nov-12 17:37pm
Sergey Alexandrovich Kryukov 13-Nov-12 23:41pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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:[^].

Whenever you make a decision of port assignment, regardless of its application, you should always refer to this normative document of IANA:[^].

See also:[^].

IANA is an ultimate authority in Internet assigned numbers, it's directives play the role of the law. Please see:[^],[^].

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:[^].

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,

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171016.2 | Last Updated 14 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100