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 saw this tutorial . But it seems outdated as mine httpd.conf is empty and it looks some sort of divided configuration under "/etc/apache2 ".(I am on ubuntu 10 server)

and i can use same ip ? right ?

I have files like

apache2.conf  
envvars     
magic           
mods-enabled  
sites-available
conf.d        
httpd.conf  
mods-available  
ports.conf    
sites-enabled

Q: and i can use same ip ? right ?

share|improve this question
add comment

2 Answers 2

up vote 1 down vote accepted

Yes, You can use the same IP address.

You need to do a little research into VirtualHosts.

NameVirtualHost *:80
<VirtualHost>
    ServerName  somedomain.com
    DocumentRoot    /srv/domains/somedomain.com/htdocs
    ErrorLog    /srv/domains/somedomain.com/logs/error_log
    CustomLog   /srv/domains/somedomain.com/logs/access_log combined
</VirtualHost>

<VirtualHost>
    ServerName  otherdomain.com
    DocumentRoot    /srv/domains/otherdomain.com/htdocs
    ErrorLog    /srv/domains/otherdomain.com/logs/error_log
    CustomLog   /srv/domains/otherdomain.com/logs/access_log combined
</VirtualHost>

Personally I break up the individual domains into pieces and place them in conf.d (all .conf files should be loaded in that folder by default)

share|improve this answer
add comment

This tutorial is about setting up Apache Virtual Hosts on Ubuntu Server 10.04.

share|improve this answer
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.