Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to make my dev sites have port numbers. I thought I would just start at a certain number and increment by 1 every new site. The question is what number should I start with? I have know there are reserved ports at various numbers. Are there a range of numbers that can be assumed safe to use?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

Wikipedia has an exhaustive list of well-known ports. You should probably pick something 1024 or greater that isn't already in use.

share|improve this answer
add comment

user983223 you can use ports bigger then 1024. Using virtual hosts is a better approach to building a good web development server. If you need more information on setting up virtual hosts let me know your OS and web server details, that way I will be able to help you.

share|improve this answer
3  
Running different sites on different ports makes it easier to restrict access to those sites with a firewall. This is probably an important consideration when running dev and prod sites on the same physical box. –  MDMarra Oct 27 '12 at 23:39
1  
@MDMarra True, but Virtualhosts can be configured to listen only on local IP so they are not accessible from internet or on a local IP in a different subnet only accessible to the dev. So you can restrict the access this way easily too. –  laurent Oct 27 '12 at 23:54
    
A better way to restrict access to a develpment website is by using .htaccess authentication, have you ever thought about it? have a look pagematic.com/faq/htaccess.htm (a random tutorial found on google) –  Hex Oct 27 '12 at 23:58
2  
Thanks for the link, but I'm familiar with .htaccess. Many people are more comfortable relying on firewall rules than software access control. An even better approach is to use both. Security is best handled in layers. –  MDMarra Oct 28 '12 at 0:01
    
as @laurent said: the answer to your question is to set-up different ports for different websites using virtual hosts. If you dont know how, let me know –  Hex Oct 28 '12 at 0:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.