Virtual Hosts apache

Pagina: 1
Acties:
  • 110 views sinds 30-01-2008
  • Reageer

  • Voois
  • Registratie: Augustus 2006
  • Laatst online: 02-02 22:15
Hallo,

Ik ben al een tijdje aan het stoeien met virtual hosts van apache. Maar ik krijg niet wat ik wil.

Situatie:
1 vast ip adres
2 verschillende domeinen (www.domein1.nl en www.domein2.nl) bij verschillende providers die beiden door verwijzen naar het IP adres.
De docs staan onder www/domein1 en www/domein2

Wat ik probeer ik krijg bij beide domein1 te zien.

Waar ligt dit aan wat doe ik niet goed? Plz help.
alvast bedankt.

  • sariel
  • Registratie: Mei 2004
  • Laatst online: 22-05-2024
wat is je default domain?
kan je je configuratie laten zien?

Copy.com


  • Voois
  • Registratie: Augustus 2006
  • Laatst online: 02-02 22:15
tja default domein? euh Servername staat op localhost en ik krijg dus bij beide domeinen wiseopreis.nl


NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /www/domein2/
ServerName wiseopreis.nl
ServerAlias www.wiseopreis.nl
ErrorLog logs/dummy-host.user.com-error_log
CustomLog logs/dummy-host.user.com-access_log common
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /www/domein1/"
ServerName hairathome.nl
ErrorLog logs/dummy-host2.user.com-error_log
CustomLog logs/dummy-host2.user.com-access_log common
</VirtualHost>

  • har0
  • Registratie: December 2006
  • Laatst online: 10-02-2022
Jammer, hier ging wat mis en nou is ik te laat :D

Mis ik niet ergens de verwijzing naar domein=folder per domein ?

ServerName server1.hots1.naam
DocumentRoot /folder/naam1/
<Directory> /folder/naam1/
Options naar behoeven
Order ??
Allow ??
</Directory>

[ Voor 10% gewijzigd door har0 op 23-08-2007 11:39 ]


  • sariel
  • Registratie: Mei 2004
  • Laatst online: 22-05-2024
DocumentRoot /www/domein1/"
ik zie daar een quotje. tikfoutje misschien?

Copy.com


  • Voois
  • Registratie: Augustus 2006
  • Laatst online: 02-02 22:15
das idd een tikfoutje. staat gewoon goed (anders geeft ie bij restart server ook een fout)

Directory geeft ook een fout. ben ik nog ff aan het uitzoeken

  • Gunner
  • Registratie: Oktober 1999
  • Niet online

Gunner

Invincibles

code:
1
2
3
4
5
6
7
8
9
<VirtualHost *:80>
ServerName bla.nl
DocumentRoot d:/inetpub/wwwroot
</VirtualHost>

<VirtualHost *:80>
ServerName bla..com
DocumentRoot d:/inetpub/pq
</VirtualHost>


Voorbeeld van mijn werkende Virtual Hosts onder Apache 2.0.59

[ Voor 3% gewijzigd door Gunner op 23-08-2007 11:49 ]

Still warm the blood that courses through my veins. | PvOutput | ARSENAL FC


  • Voois
  • Registratie: Augustus 2006
  • Laatst online: 02-02 22:15
ja en wat heb je als servername in je httpd.conf (buiten je virtual host om?)

  • Gunner
  • Registratie: Oktober 1999
  • Niet online

Gunner

Invincibles

Voois schreef op donderdag 23 augustus 2007 @ 11:51:
ja en wat heb je als servername in je httpd.conf (buiten je virtual host om?)
Das gewoon m'n computernaam:80

Still warm the blood that courses through my veins. | PvOutput | ARSENAL FC


  • fre0n
  • Registratie: April 2005
  • Laatst online: 12-11 01:56
Windows of Linux?

https://twitch.tv/magus77nl


  • Voois
  • Registratie: Augustus 2006
  • Laatst online: 02-02 22:15
windows vista

  • Voois
  • Registratie: Augustus 2006
  • Laatst online: 02-02 22:15
Gunner schreef op donderdag 23 augustus 2007 @ 11:49:
code:
1
2
3
4
5
6
7
8
9
<VirtualHost *:80>
ServerName bla.nl
DocumentRoot d:/inetpub/wwwroot
</VirtualHost>

<VirtualHost *:80>
ServerName bla..com
DocumentRoot d:/inetpub/pq
</VirtualHost>


Voorbeeld van mijn werkende Virtual Hosts onder Apache 2.0.59
Bij de tweede servername staat bla..com (2 puntjes, foutje?)

  • CodeCaster
  • Registratie: Juni 2003
  • Niet online

CodeCaster

Can I get uhm...

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Virtual Hosts
NameVirtualHost *:80

<VirtualHost *:80>
    NameVirtualHost home.codecaster.nl
    ServerName home.codecaster.nl
    DocumentRoot "D:/Sites/home/"
</VirtualHost>
<Directory D:/Sites/home/>
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

<VirtualHost *:80>
    NameVirtualHost dev.home.codecaster.nl
    ServerName dev.home.codecaster.nl
    DocumentRoot "D:/Sites/CodeCaster2.nl/"
</VirtualHost>
<VirtualHost *:80>
    NameVirtualHost cc2.cclaptop.local
    ServerName cc2.cclaptop.local
    DocumentRoot "D:/Sites/CodeCaster2.nl/"
</VirtualHost>
<Directory D:/Sites/CodeCaster2.nl/>
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>


Zo staat 'ie bij mij, en het werkt.

[ Voor 10% gewijzigd door CodeCaster op 23-08-2007 12:51 ]

https://oneerlijkewoz.nl
Op papier is hij aan het tekenen, maar in de praktijk...


  • Gunner
  • Registratie: Oktober 1999
  • Niet online

Gunner

Invincibles

Voois schreef op donderdag 23 augustus 2007 @ 12:44:
[...]


Bij de tweede servername staat bla..com (2 puntjes, foutje?)
Ja das een foutje idd.

Still warm the blood that courses through my veins. | PvOutput | ARSENAL FC


  • Voois
  • Registratie: Augustus 2006
  • Laatst online: 02-02 22:15
Bedankt allemaal! Ben er achter! Ik gebruik niet poort 80 dus daarom liep het niet goed. Dus het is nu:

NameVirtualHost *

<VirtualHost *>
ServerName www.wiseopreis.nl
DocumentRoot /www/dm1
</VirtualHost>


<VirtualHost *>
ServerName www.hairathome.nl
DocumentRoot /www/dm2
</VirtualHost>

etc
Pagina: 1