Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: PHP
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
Edited 13-Nov-12 17:37pm
v2
Comments
Sergey Alexandrovich Kryukov at 13-Nov-12 23:41pm
   
Why?
--SA

1 solution

Rate this: bad
good
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:
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
  Permalink  
v4

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

  Print Answers RSS
0 CPallini 480
1 Sergey Alexandrovich Kryukov 335
2 OriginalGriff 285
3 George Jonsson 246
4 Gihan Liyanage 235
0 OriginalGriff 4,873
1 CPallini 3,900
2 Sergey Alexandrovich Kryukov 3,474
3 George Jonsson 2,646
4 Gihan Liyanage 2,236


Advertise | Privacy | Mobile
Web04 | 2.8.140905.1 | Last Updated 14 Nov 2012
Copyright © CodeProject, 1999-2014
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