|
|
|
|
||||||
| alt.apache.configuration Apache web server configuration issues. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Before I start I have little experience in apache and am in need of
your sound advice. I have 2 websites pointing to my 1 ip. Now I understand that I need to create a virtual host and I believe i have done so but get the following error [Tue Feb 12 15:34:00 2008] [warn] _default_ VirtualHost overlap on port 80, the first has precedence [Tue Feb 12 15:34:00 2008] [warn] _default_ VirtualHost overlap on port 80, the first has precedence Now I am trying to point my second website into a folder in my htdocs. I have set up the virtual hosts but it still doesnt work. I am using a windows machine with xampp. Please advise on how to fix this. I have heard of editing a file namevirtualhosts. That doesnt exist on my computer. Thanks for reading and thanks if you can . Many Thanks Paul |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 2008-02-12, pjg281@googlemail.com <pjg281@googlemail.com> wrote:
> I have 2 websites pointing to my 1 ip. Now I understand that I need to > create a virtual host and I believe i have done so but get the > following error Your configuration ain't right. If it was, you wouldn't receive an error. > Thanks for reading and thanks if you can . Let's see your configuration. Davide -- I think I'd like to see a Simpsons episode start up with Bart Simpson writing 'I will not attempt to undermine the Usenet cabal'. --J.D. Falk |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
<pjg281@googlemail.com> wrote in message
news:cbc6913b-1ab1-42ba-a5e1-b29f7b5ac5d6@s12g2000prg.googlegroups.com... > Before I start I have little experience in apache and am in need of > your sound advice. > > I have 2 websites pointing to my 1 ip. Now I understand that I need to > create a virtual host and I believe i have done so but get the > following error > [Tue Feb 12 15:34:00 2008] [warn] _default_ VirtualHost overlap on > port 80, the first has precedence > [Tue Feb 12 15:34:00 2008] [warn] _default_ VirtualHost overlap on > port 80, the first has precedence > > Now I am trying to point my second website into a folder in my htdocs. > I have set up the virtual hosts but it still doesnt work. I am using a > windows machine with xampp. Please advise on how to fix this. > > I have heard of editing a file namevirtualhosts. That doesnt exist on > my computer. It is not a file, it is an apache directive and is required to avoid the 'overlap'. The NameVirtualHost directive needs to match the info used in the VirtualHost sections, it basically tells apache to look out for name based virtual hosting on that IP/PORT combination. NameVirtualHost <IP>:<PORT> <VirtualHost <IP>:<PORT>> example1: NameVirtualHost 1.2.3.4:80 <VirtualHost 1.2.3.4:80> ServerName server1 ... </VirtualHost> <VirtualHost 1.2.3.4:80> ServerName server2 ... </VirtualHost> or example2 with wildcarded ip address: NameVirtualHost *:80 <VirtualHost *:80> ServerName server1 ... </VirtualHost> <VirtualHost *:80> ServerName server2 ... </VirtualHost> |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Here is my current config
<VirtualHost *:80> ServerName www.1website.co.uk DocumentRoot /xampp/htdocs/ ServerAlias www.1website.co.uk <Directory /xampp/htdocs/> Options Indexes ExecCGI AllowOverride All Order allow,deny Allow from All </Directory> </VirtualHost> <VirtualHost *:80> ServerName www.2website.co.uk DocumentRoot /xampp/htdocs/clancok/ ServerAlias www.2website.co.uk <Directory /xampp/htdocs/2website/> Options Indexes ExecCGI AllowOverride All Order allow,deny Allow from All </Directory> </VirtualHost> |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Feb 12, 5:52pm, pjg...@googlemail.com wrote:
> Here is my current config > <VirtualHost *:80> > ServerName www.1website.co.uk > DocumentRoot /xampp/htdocs/ > ServerAliaswww.1website.co.uk > <Directory /xampp/htdocs/> > Options Indexes ExecCGI > AllowOverride All > Order allow,deny > Allow from All > </Directory> > </VirtualHost> > <VirtualHost *:80> > ServerName www.2website.co.uk > DocumentRoot /xampp/htdocs/clancok/ > ServerAliaswww.2website.co.uk > <Directory /xampp/htdocs/2website/> > Options Indexes ExecCGI > AllowOverride All > Order allow,deny > Allow from All > </Directory> > </VirtualHost> Sorry forgot to add this. That is my current config file. I dont know what I am doing wrong maybe you can see something and me |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
pjg281@googlemail.com schreef:
> Here is my current config > <VirtualHost *:80> > ServerName www.1website.co.uk > DocumentRoot /xampp/htdocs/ > ServerAlias www.1website.co.uk > <Directory /xampp/htdocs/> > Options Indexes ExecCGI > AllowOverride All > Order allow,deny > Allow from All > </Directory> > </VirtualHost> > <VirtualHost *:80> > ServerName www.2website.co.uk > DocumentRoot /xampp/htdocs/clancok/ > ServerAlias www.2website.co.uk > <Directory /xampp/htdocs/2website/> > Options Indexes ExecCGI > AllowOverride All > Order allow,deny > Allow from All > </Directory> > </VirtualHost> > the line "NameVirtualHost *:80" is missing at the start. after changeing, try $ sudo apachectl -S to check if thing are OK -- Luuk |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
On Feb 12, 6:27pm, Luuk <L...@invalid.lan> wrote:
> pjg...@googlemail.com schreef: > > > > > > > Here is my current config > > <VirtualHost *:80> > > ServerName www.1website.co.uk > > DocumentRoot /xampp/htdocs/ > > ServerAliaswww.1website.co.uk > > <Directory /xampp/htdocs/> > > Options Indexes ExecCGI > > AllowOverride All > > Order allow,deny > > Allow from All > > </Directory> > > </VirtualHost> > > <VirtualHost *:80> > > ServerName www.2website.co.uk > > DocumentRoot /xampp/htdocs/clancok/ > > ServerAliaswww.2website.co.uk > > <Directory /xampp/htdocs/2website/> > > Options Indexes ExecCGI > > AllowOverride All > > Order allow,deny > > Allow from All > > </Directory> > > </VirtualHost> > > the line "NameVirtualHost *:80" is missing at the start. > > after changeing, try > > $ sudo apachectl -S > to check if thing are OK > > -- > Luuk- Hide quoted text - > > - Show quoted text - sorry to ask but it didnt seem to work could you add it to here please <VirtualHost *:80> ServerName www.1website.co.uk DocumentRoot /xampp/htdocs/ ServerAlias www.1website.co.uk <Directory /xampp/htdocs/> Options Indexes ExecCGI AllowOverride All Order allow,deny Allow from All </Directory> </VirtualHost> That would be very much apreciated. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
On Feb 12, 6:27pm, Luuk <L...@invalid.lan> wrote:
> pjg...@googlemail.com schreef: > > > > > > > Here is my current config > > <VirtualHost *:80> > > ServerName www.1website.co.uk > > DocumentRoot /xampp/htdocs/ > > ServerAliaswww.1website.co.uk > > <Directory /xampp/htdocs/> > > Options Indexes ExecCGI > > AllowOverride All > > Order allow,deny > > Allow from All > > </Directory> > > </VirtualHost> > > <VirtualHost *:80> > > ServerName www.2website.co.uk > > DocumentRoot /xampp/htdocs/clancok/ > > ServerAliaswww.2website.co.uk > > <Directory /xampp/htdocs/2website/> > > Options Indexes ExecCGI > > AllowOverride All > > Order allow,deny > > Allow from All > > </Directory> > > </VirtualHost> > > the line "NameVirtualHost *:80" is missing at the start. > > after changeing, try > > $ sudo apachectl -S > to check if thing are OK > > -- > Luuk- Hide quoted text - > > - Show quoted text - Actualy got it sounded a stupid question after i figured it out lol. Now it says everything is ok but when i type in the two seperate web addresses it still goes to the first one why would that be? |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
pjg281@googlemail.com schreef:
> On Feb 12, 6:27 pm, Luuk <L...@invalid.lan> wrote: >> pjg...@googlemail.com schreef: >> >> >> >> >> >>> Here is my current config >>> <VirtualHost *:80> >>> ServerName www.1website.co.uk >>> DocumentRoot /xampp/htdocs/ >>> ServerAliaswww.1website.co.uk >>> <Directory /xampp/htdocs/> >>> Options Indexes ExecCGI >>> AllowOverride All >>> Order allow,deny >>> Allow from All >>> </Directory> >>> </VirtualHost> >>> <VirtualHost *:80> >>> ServerName www.2website.co.uk >>> DocumentRoot /xampp/htdocs/clancok/ >>> ServerAliaswww.2website.co.uk >>> <Directory /xampp/htdocs/2website/> >>> Options Indexes ExecCGI >>> AllowOverride All >>> Order allow,deny >>> Allow from All >>> </Directory> >>> </VirtualHost> >> the line "NameVirtualHost *:80" is missing at the start. >> >> after changeing, try >> >> $ sudo apachectl -S >> to check if thing are OK >> >> -- >> Luuk- Hide quoted text - >> >> - Show quoted text - > > sorry to ask but it didnt seem to work could you add it to here please > > <VirtualHost *:80> > ServerName www.1website.co.uk > DocumentRoot /xampp/htdocs/ > ServerAlias www.1website.co.uk > <Directory /xampp/htdocs/> > Options Indexes ExecCGI > AllowOverride All > Order allow,deny > Allow from All > </Directory> > </VirtualHost> > > That would be very much apreciated. it should go before the first "<VirtualHost *:80>" for more info see: http://httpd.apache.org/docs/2.0/mod...amevirtualhost -- Luuk |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
On Feb 12, 6:40pm, Luuk <L...@invalid.lan> wrote:
> pjg...@googlemail.com schreef: > > > > > > > On Feb 12, 6:27 pm, Luuk <L...@invalid.lan> wrote: > >> pjg...@googlemail.com schreef: > > >>> Here is my current config > >>> <VirtualHost *:80> > >>> ServerName www.1website.co.uk > >>> DocumentRoot /xampp/htdocs/ > >>> ServerAliaswww.1website.co.uk > >>> <Directory /xampp/htdocs/> > >>> Options Indexes ExecCGI > >>> AllowOverride All > >>> Order allow,deny > >>> Allow from All > >>> </Directory> > >>> </VirtualHost> > >>> <VirtualHost *:80> > >>> ServerName www.2website.co.uk > >>> DocumentRoot /xampp/htdocs/clancok/ > >>> ServerAliaswww.2website.co.uk > >>> <Directory /xampp/htdocs/2website/> > >>> Options Indexes ExecCGI > >>> AllowOverride All > >>> Order allow,deny > >>> Allow from All > >>> </Directory> > >>> </VirtualHost> > >> the line "NameVirtualHost *:80" is missing at the start. > > >> after changeing, try > > >> $ sudo apachectl -S > >> to check if thing are OK > > >> -- > >> Luuk- Hide quoted text - > > >> - Show quoted text - > > > sorry to ask but it didnt seem to work could you add it to here please > > > <VirtualHost *:80> > > ServerName www.1website.co.uk > > DocumentRoot /xampp/htdocs/ > > ServerAliaswww.1website.co.uk > > <Directory /xampp/htdocs/> > > Options Indexes ExecCGI > > AllowOverride All > > Order allow,deny > > Allow from All > > </Directory> > > </VirtualHost> > > > That would be very much apreciated. > > it should go before the first "<VirtualHost *:80>" > > for more info see:http://httpd.apache.org/docs/2.0/mod...amevirtualhost > > -- > Luuk- Hide quoted text - > > - Show quoted text - Yeah i put ut there. thank you very much. What i done was copied it all to the bottom of httpd.conf restared (it crashed) then i took it out restarted server and it worked. even though i had previously restarted it. Many thanks for your your all geniuses |
|
![]() |
| Outils de la discussion | |
|
|