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 ?

link|improve this question

78% accept rate
feedback

2 Answers

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)

link|improve this answer
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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