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 have set up a web site on linux server. I want to know that is there any way to set multiple domain on same IP using different PORT? so that I can manage multiple sites on same server(i.e same IP).

share|improve this question
    
Do you really need different ports? Because it does not make sense to put up a website per port ... –  Lucas Kauffman Feb 27 '12 at 7:44

1 Answer 1

up vote 2 down vote accepted

You can make Apache2 (if you are using Apache2) listen on multiple ports and use vhosts and redirects to put up a site per port.

However, you can also easily manage many websites on one port number and also use vhosts to redirect to these websites.

An example of a vhost can be:

 <VirtualHost *:80>
    DocumentRoot /var/www/yoursite
    ServerName www.somesite.com
</VirtualHost>  
share|improve this answer

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.