superyupkent Posted April 2, 2004 Report Share Posted April 2, 2004 Hello everyone, I have been reading on the apache website, but i'm getting a bit confused of all the terms and possibilities there. I have 4 domains that I would like to serve, the problem is that I have only received one IP from my ISP. What I understand from apache site is that namevirtualhosting is a possibility but what is the command then? can I simply do something like: NameVirtualHost * <VirtualHost _default_> ServerName www.domain1.org DocumentRoot /var/www/domain1 #ErrorLog /dev/null #TransferLog /dev/null </VirtualHost> <VirtualHost *> ServerName mail.domain2.org DocumentRoot /var/www/domain2 </VirtualHost> Quote Link to comment Share on other sites More sharing options...
fissy Posted April 25, 2004 Report Share Posted April 25, 2004 mine looks more like this: ***************************************** NameVirtualHost *:80 <VirtualHost *:80> ServerName www.domain1.org DocumentRoot /var/www/domain1 #ErrorLog /dev/null #TransferLog /dev/null </VirtualHost> <VirtualHost *:80> ServerName mail.domain2.org DocumentRoot /var/www/domain2 </VirtualHost> <Directory /var/www/domain2> order allow,deny allow from all </Directory> ***************************************** the first is the default host in my configuration, it has the same server name as the system server name in apache2.conf, but i don't specify it as _default_. Whether you will need the directory directives will depend on where your virtual servers document roots are. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.