You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Kranti K K Parisa [GetSet-India]" <kr...@gmail.com> on 2007/08/13 23:23:24 UTC

[users@httpd] Urgent : Configure multiple websites

Hi,

I am pretty much new to Apache. Earlier was working on IIS where creating
websites thru UI is a bit easy.

Please help me to create multiple websites, which are hosted on same
computer (means with same IP address but different domain names) each domain
should point to different folders so that content from website to website
can be varied.

Thanks in advance


Regards, Kranti

Re: [users@httpd] Urgent : Configure multiple websites

Posted by Tony Stevenson <to...@pc-tony.com>.
Kranti,

Have a look at this: http://wiki.apache.org/httpd/ExampleVhosts
This has example of exactly what you are trying to do, albeit in a Linux 
environment.

Just remember, don't use "\" rather use "/"  i.e 
"C:/Apache/htdocs/www.example.com"

You basically need:

NameVirtualHost *:80

<VirtualHost *:80>
   Servername www.example.com
   Documentroot "C:/Apache/htdocs/www.example.com"

   <Directory "C:/Apache/htdocs/www.example.com">
     Order Allow,Deny
     Allow from all
   </Directory>
</Virtualhost>

<VirtualHost *:80>
   #Vhost 2 goes here
</Virtualhost>

<VirtualHost *:80>
   #Vhost 3 goes here
</Virtualhost>



So long as you create a <Directory> block (like the one above) for each 
of the documentroot's you should be ok.

Once you have this you will have a basic, and simple working Apache server



Cheers,
Tony


Kranti K K Parisa [GetSet-India] wrote:
> Hi,
> 
> Somehow I found that I need to define VirtualHost definitions.
> 
> But in apache_2.2.4-win32-x86-no_ssl.msi version,
> I can see a file under conf/extra folder with the name 
> httpd-vhosts.conf, where NameVirtualHost and other tags are there.
> 
> whats the issue is, I need to define 3 websites
> 1) www.abc.com <http://www.abc.com>  [files are there under 
> C:\APACHE\htdocs\abc folder
> 2) www.xyz.com <http://www.xyz.com> [files are there under 
> C:\APACHE\htdocs\xyzfolder
> 3) www.kkk.com <http://www.kkk.com> [files are there under 
> C:\APACHE\htdocs\kkk folder
> 
> so what would be my tags
> 
> Thanks, Kranti
> 
> 
> 
> On 8/14/07, *Craig Huffstetler* <craig.huffstetler@gmail.com 
> <ma...@gmail.com>> wrote:
> 
>     Greetings,
>      
>     Please see:
>      
>     http://www.apacheweek.com/features/vhost
>     and/or
>     http://httpd.apache.org/docs/1.3/vhosts/name-based.html
>      
>     For information on what you are trying to accomplish. It will be
>     accomplished by modifying the httpd.conf file.
>      
>     Sincerely,
>      
>     Craig
>      
>     On 8/13/07, *Kranti K K Parisa [GetSet-India]* <
>     kranti.parisa@gmail.com <ma...@gmail.com>> wrote:
> 
>         Hi,
> 
>         I am pretty much new to Apache. Earlier was working on IIS where
>         creating websites thru UI is a bit easy.
> 
>         Please help me to create multiple websites, which are hosted on
>         same computer (means with same IP address but different domain
>         names) each domain should point to different folders so that
>         content from website to website can be varied.
> 
>         Thanks in advance
> 
> 
>         Regards, Kranti 
> 
> 
> 
> 
>     -- 
>     Craig Huffstetler 
> 
> 
> 
> 
> -- 
> ------------------
> Best Regards
> Kranti Kiran Kumar Parisa
> Mobile: +91 - 9849 - 625 - 625
>             +91 - 9391 - 438 - 738

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Urgent : Configure multiple websites

Posted by "Kranti K K Parisa [GetSet-India]" <kr...@gmail.com>.
Hi,

Somehow I found that I need to define VirtualHost definitions.

But in apache_2.2.4-win32-x86-no_ssl.msi version,
I can see a file under conf/extra folder with the name httpd-vhosts.conf,
where NameVirtualHost and other tags are there.

whats the issue is, I need to define 3 websites
1) www.abc.com  [files are there under C:\APACHE\htdocs\abc folder
2) www.xyz.com [files are there under C:\APACHE\htdocs\xyzfolder
3) www.kkk.com [files are there under C:\APACHE\htdocs\kkk folder

so what would be my tags

Thanks, Kranti



On 8/14/07, Craig Huffstetler <cr...@gmail.com> wrote:
>
> Greetings,
>
> Please see:
>
> http://www.apacheweek.com/features/vhost
> and/or
> http://httpd.apache.org/docs/1.3/vhosts/name-based.html
>
> For information on what you are trying to accomplish. It will be
> accomplished by modifying the httpd.conf file.
>
> Sincerely,
>
> Craig
>
> On 8/13/07, Kranti K K Parisa [GetSet-India] <kr...@gmail.com>
> wrote:
> >
> > Hi,
> >
> > I am pretty much new to Apache. Earlier was working on IIS where
> > creating websites thru UI is a bit easy.
> >
> > Please help me to create multiple websites, which are hosted on same
> > computer (means with same IP address but different domain names) each domain
> > should point to different folders so that content from website to website
> > can be varied.
> >
> > Thanks in advance
> >
> >
> > Regards, Kranti
>
>
>
>
> --
> Craig Huffstetler




-- 
------------------
Best Regards
Kranti Kiran Kumar Parisa
Mobile: +91 - 9849 - 625 - 625
            +91 - 9391 - 438 - 738

Re: [users@httpd] Urgent : Configure multiple websites

Posted by Craig Huffstetler <cr...@gmail.com>.
Greetings,

Please see:

http://www.apacheweek.com/features/vhost
and/or
http://httpd.apache.org/docs/1.3/vhosts/name-based.html

For information on what you are trying to accomplish. It will be
accomplished by modifying the httpd.conf file.

Sincerely,

Craig

On 8/13/07, Kranti K K Parisa [GetSet-India] <kr...@gmail.com>
wrote:
>
> Hi,
>
> I am pretty much new to Apache. Earlier was working on IIS where creating
> websites thru UI is a bit easy.
>
> Please help me to create multiple websites, which are hosted on same
> computer (means with same IP address but different domain names) each domain
> should point to different folders so that content from website to website
> can be varied.
>
> Thanks in advance
>
>
> Regards, Kranti




-- 
Craig Huffstetler

Re: [users@httpd] Urgent : Configure multiple websites

Posted by "Kranti K K Parisa [GetSet-India]" <kr...@gmail.com>.
Hi,

I will try to follow your steps right away.
I will update you soon.

Thanks, Kranti

On 8/14/07, Chakan <ch...@gmx.de> wrote:
>
>  This side will not help! Because the httpd.conf in the Apache 2.2.4 work
> different.
> Kranti, please do following steps:
>
> Please configure httpd.conf as below:
>
> # Virtual hosts
> Include conf/extra/httpd-vhosts.conf
>
> Then please open in the folder
> C:\Program Files\Apache Software Foundation\Apache2.2\conf\extra
>
> the file httpd-vhosts.conf and change only the temporary information with
> your informations.
>
> Here an example:
>
> NameVirtualHost *:80
>
> <VirtualHost *:80>
>     ServerAdmin webmaster@testing.local
>     DocumentRoot "C:/wwwroot"
>     ServerName testing.local
>     ServerAlias www.testing.local
>     ErrorLog C:/wwwroot/logs/error_apache.txt
>     CustomLog C:/wwwroot/logs/access_apache.txt common
>     <Directory "C:/wwwroot">
>     AllowOverride All
>     Options Indexes FollowSymLinks
>     Order allow,deny
>     Allow from all
>     </Directory>
> </VirtualHost>
>
> Okay?
>
> And you have to put also under virtual host the Servername and Serveralias
> in the Windows host
> C:\WINDOWS\system32\drivers\etc
> Open the file hosts
>
> And write
> 127.0.0.1 testing.local
>
>
> Then open the internet explorer and write http://testing.local
>
> Kind regards,
> Ch
>
>
>  ------------------------------
> *From:* Craig Huffstetler [mailto:craig.huffstetler@gmail.com]
> *Sent:* 13 August 2007 23:35
> *To:* users@httpd.apache.org
> *Subject:* Re: [users@httpd] Urgent : Configure multiple websites
>
>  Then see:
>
> http://apptools.com/phptools/virtualhost.php
>
> For a guide based on Windows files/folders.
>
> The syntax is still the same, however.
>
> Cheers,
>
> Craig
>
>
> On 8/13/07, Kranti K K Parisa [GetSet-India] <kr...@gmail.com>
> wrote:
> >
> > Hi,
> >
> > I am using apache_2.2.4-win32-x86-no_ssl.msi on windows 2003 server.
> >
> > Thanks, Kranti
> >
> > On 8/14/07, Chakan < chakan@gmx.de> wrote:
> > >
> > >  Hello Kranti,
> > > which version of Apache do you use and with which operation system?
> > > Kind regards,
> > > Ch
> > >
> > >  ------------------------------
> > > *From:* Kranti K K Parisa [GetSet-India] [mailto:
> > > kranti.parisa@gmail.com ]
> > > *Sent:* 13 August 2007 23:23
> > > *To:* users@httpd.apache.org
> > > *Subject:* [users@httpd ] Urgent : Configure multiple websites
> > >
> > >
> > >  Hi,
> > >
> > > I am pretty much new to Apache. Earlier was working on IIS where
> > > creating websites thru UI is a bit easy.
> > >
> > > Please help me to create multiple websites, which are hosted on same
> > > computer (means with same IP address but different domain names) each domain
> > > should point to different folders so that content from website to website
> > > can be varied.
> > >
> > > Thanks in advance
> > >
> > >
> > > Regards, Kranti
> > >
> >
> >
> >
> > --
> > ------------------
> > Best Regards
> > Kranti Kiran Kumar Parisa
> > Mobile: +91 - 9849 ...
> >             +91 - 9391 - 438 - 738
>
>
>
>
> --
> Craig Huffstetler
>



-- 
------------------
Best Regards
Kranti Kiran Kumar Parisa
Mobile: +91 - 9849 - 625 - 625
            +91 - 9391 - 438 - 738

Re: [users@httpd] Urgent : Configure multiple websites

Posted by "Kranti K K Parisa [GetSet-India]" <kr...@gmail.com>.
Hi Chakan,

I got it.

Thank you very much.

Regards, Kranti

On 8/14/07, Chakan <ch...@gmx.de> wrote:
>
>  This side will not help! Because the httpd.conf in the Apache 2.2.4 work
> different.
> Kranti, please do following steps:
>
> Please configure httpd.conf as below:
>
> # Virtual hosts
> Include conf/extra/httpd-vhosts.conf
>
> Then please open in the folder
> C:\Program Files\Apache Software Foundation\Apache2.2\conf\extra
>
> the file httpd-vhosts.conf and change only the temporary information with
> your informations.
>
> Here an example:
>
> NameVirtualHost *:80
>
> <VirtualHost *:80>
>     ServerAdmin webmaster@testing.local
>     DocumentRoot "C:/wwwroot"
>     ServerName testing.local
>     ServerAlias www.testing.local
>     ErrorLog C:/wwwroot/logs/error_apache.txt
>     CustomLog C:/wwwroot/logs/access_apache.txt common
>     <Directory "C:/wwwroot">
>     AllowOverride All
>     Options Indexes FollowSymLinks
>     Order allow,deny
>     Allow from all
>     </Directory>
> </VirtualHost>
>
> Okay?
>
> And you have to put also under virtual host the Servername and Serveralias
> in the Windows host
> C:\WINDOWS\system32\drivers\etc
> Open the file hosts
>
> And write
> 127.0.0.1 testing.local
>
>
> Then open the internet explorer and write http://testing.local
>
> Kind regards,
> Ch
>
>
>  ------------------------------
> *From:* Craig Huffstetler [mailto:craig.huffstetler@gmail.com]
> *Sent:* 13 August 2007 23:35
> *To:* users@httpd.apache.org
> *Subject:* Re: [users@httpd] Urgent : Configure multiple websites
>
>  Then see:
>
> http://apptools.com/phptools/virtualhost.php
>
> For a guide based on Windows files/folders.
>
> The syntax is still the same, however.
>
> Cheers,
>
> Craig
>
>
> On 8/13/07, Kranti K K Parisa [GetSet-India] <kr...@gmail.com>
> wrote:
> >
> > Hi,
> >
> > I am using apache_2.2.4-win32-x86-no_ssl.msi on windows 2003 server.
> >
> > Thanks, Kranti
> >
> > On 8/14/07, Chakan < chakan@gmx.de> wrote:
> > >
> > >  Hello Kranti,
> > > which version of Apache do you use and with which operation system?
> > > Kind regards,
> > > Ch
> > >
> > >  ------------------------------
> > > *From:* Kranti K K Parisa [GetSet-India] [mailto:
> > > kranti.parisa@gmail.com ]
> > > *Sent:* 13 August 2007 23:23
> > > *To:* users@httpd.apache.org
> > > *Subject:* [users@httpd ] Urgent : Configure multiple websites
> > >
> > >
> > >  Hi,
> > >
> > > I am pretty much new to Apache. Earlier was working on IIS where
> > > creating websites thru UI is a bit easy.
> > >
> > > Please help me to create multiple websites, which are hosted on same
> > > computer (means with same IP address but different domain names) each domain
> > > should point to different folders so that content from website to website
> > > can be varied.
> > >
> > > Thanks in advance
> > >
> > >
> > > Regards, Kranti
> > >
> >
> >
> >
> > --
> > ------------------
> > Best Regards
> > Kranti Kiran Kumar Parisa
> > Mobile: +91 - 9849 ...
> >             +91 - 9391 - 438 - 738
>
>
>
>
> --
> Craig Huffstetler
>



-- 
------------------
Best Regards
Kranti Kiran Kumar Parisa
Mobile: +91 - 9849 - 625 - 625
            +91 - 9391 - 438 - 738

RE: [users@httpd] Urgent : Configure multiple websites

Posted by Chakan <ch...@gmx.de>.
This side will not help! Because the httpd.conf in the Apache 2.2.4 work
different.
Kranti, please do following steps:
 
Please configure httpd.conf as below:
 
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
 
Then please open in the folder
C:\Program Files\Apache Software Foundation\Apache2.2\conf\extra
 
the file httpd-vhosts.conf and change only the temporary information with
your informations.
 
Here an example:
 
NameVirtualHost *:80
 
<VirtualHost *:80>
    ServerAdmin webmaster@testing.local 
    DocumentRoot "C:/wwwroot"
    ServerName testing.local
    ServerAlias www.testing.local
    ErrorLog C:/wwwroot/logs/error_apache.txt
    CustomLog C:/wwwroot/logs/access_apache.txt common
    <Directory "C:/wwwroot">
    AllowOverride All
    Options Indexes FollowSymLinks
    Order allow,deny
    Allow from all
    </Directory>
</VirtualHost>
 
Okay?
 
And you have to put also under virtual host the Servername and Serveralias
in the Windows host
C:\WINDOWS\system32\drivers\etc
Open the file hosts
 
And write
127.0.0.1 testing.local
 
 
Then open the internet explorer and write http://testing.local
 
Kind regards,
Ch
 

  _____  

From: Craig Huffstetler [mailto:craig.huffstetler@gmail.com] 
Sent: 13 August 2007 23:35
To: users@httpd.apache.org
Subject: Re: [users@httpd] Urgent : Configure multiple websites


Then see:
 
http://apptools.com/phptools/virtualhost.php
 
For a guide based on Windows files/folders.
 
The syntax is still the same, however.
 
Cheers,
 
Craig

 
On 8/13/07, Kranti K K Parisa [GetSet-India] <kr...@gmail.com>
wrote: 

Hi,

I am using apache_2.2.4-win32-x86-no_ssl.msi on windows 2003 server.

Thanks, Kranti 



On 8/14/07, Chakan < chakan@gmx.de <ma...@gmx.de> > wrote: 

Hello Kranti,
which version of Apache do you use and with which operation system?
Kind regards,
Ch

  _____  

From: Kranti K K Parisa [GetSet-India] [mailto:kranti.parisa@gmail.com ] 
Sent: 13 August 2007 23:23
To: users@httpd.apache.org
Subject: [users@httpd ] Urgent : Configure multiple websites

 

Hi,

I am pretty much new to Apache. Earlier was working on IIS where creating
websites thru UI is a bit easy.

Please help me to create multiple websites, which are hosted on same
computer (means with same IP address but different domain names) each domain
should point to different folders so that content from website to website
can be varied. 

Thanks in advance


Regards, Kranti 




-- 
------------------
Best Regards
Kranti Kiran Kumar Parisa 
Mobile: +91 - 9849 ...
            +91 - 9391 - 438 - 738 




-- 
Craig Huffstetler 

Re: [users@httpd] Urgent : Configure multiple websites

Posted by Craig Huffstetler <cr...@gmail.com>.
Then see:

http://apptools.com/phptools/virtualhost.php

For a guide based on Windows files/folders.

The syntax is still the same, however.

Cheers,

Craig


On 8/13/07, Kranti K K Parisa [GetSet-India] <kr...@gmail.com>
wrote:
>
> Hi,
>
> I am using apache_2.2.4-win32-x86-no_ssl.msi on windows 2003 server.
>
> Thanks, Kranti
>
> On 8/14/07, Chakan < chakan@gmx.de> wrote:
> >
> >  Hello Kranti,
> > which version of Apache do you use and with which operation system?
> > Kind regards,
> > Ch
> >
> >  ------------------------------
> > *From:* Kranti K K Parisa [GetSet-India] [mailto:kranti.parisa@gmail.com]
> >
> > *Sent:* 13 August 2007 23:23
> > *To:* users@httpd.apache.org
> > *Subject:* [users@httpd] Urgent : Configure multiple websites
> >
> >
> >  Hi,
> >
> > I am pretty much new to Apache. Earlier was working on IIS where
> > creating websites thru UI is a bit easy.
> >
> > Please help me to create multiple websites, which are hosted on same
> > computer (means with same IP address but different domain names) each domain
> > should point to different folders so that content from website to website
> > can be varied.
> >
> > Thanks in advance
> >
> >
> > Regards, Kranti
> >
>
>
>
> --
> ------------------
> Best Regards
> Kranti Kiran Kumar Parisa
> Mobile: +91 - 9849 ...
>             +91 - 9391 - 438 - 738




-- 
Craig Huffstetler

Re: [users@httpd] Urgent : Configure multiple websites

Posted by "Kranti K K Parisa [GetSet-India]" <kr...@gmail.com>.
Hi,

I am using apache_2.2.4-win32-x86-no_ssl.msi on windows 2003 server.

Thanks, Kranti

On 8/14/07, Chakan <ch...@gmx.de> wrote:
>
>  Hello Kranti,
> which version of Apache do you use and with which operation system?
> Kind regards,
> Ch
>
>  ------------------------------
> *From:* Kranti K K Parisa [GetSet-India] [mailto:kranti.parisa@gmail.com]
> *Sent:* 13 August 2007 23:23
> *To:* users@httpd.apache.org
> *Subject:* [users@httpd] Urgent : Configure multiple websites
>
> Hi,
>
> I am pretty much new to Apache. Earlier was working on IIS where creating
> websites thru UI is a bit easy.
>
> Please help me to create multiple websites, which are hosted on same
> computer (means with same IP address but different domain names) each domain
> should point to different folders so that content from website to website
> can be varied.
>
> Thanks in advance
>
>
> Regards, Kranti
>



-- 
------------------
Best Regards
Kranti Kiran Kumar Parisa
Mobile: +91 - 9849 - 625 - 625
            +91 - 9391 - 438 - 738

RE: [users@httpd] Urgent : Configure multiple websites

Posted by Chakan <ch...@gmx.de>.
Hello Kranti,
which version of Apache do you use and with which operation system?
Kind regards,
Ch

  _____  

From: Kranti K K Parisa [GetSet-India] [mailto:kranti.parisa@gmail.com] 
Sent: 13 August 2007 23:23
To: users@httpd.apache.org
Subject: [users@httpd] Urgent : Configure multiple websites


Hi,

I am pretty much new to Apache. Earlier was working on IIS where creating
websites thru UI is a bit easy.

Please help me to create multiple websites, which are hosted on same
computer (means with same IP address but different domain names) each domain
should point to different folders so that content from website to website
can be varied. 

Thanks in advance


Regards, Kranti